From c1b94cf6b56aafa37e5671ee4bafa314e08405e3 Mon Sep 17 00:00:00 2001 From: dissolution <50195845+SDV109@users.noreply.github.com> Date: Wed, 25 Dec 2024 16:48:02 +0700 Subject: [PATCH] Insert 3 files --- ansible.cfg | 16 ++++++++++++++++ inventory | 9 +++++++++ ping.yml | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100644 ansible.cfg create mode 100644 inventory create mode 100644 ping.yml diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..27af8df --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,16 @@ +[defaults] +inventory = ./inventory.txt +remote_tmp = /tmp/${USER}/ansible +allow_world_readable_tmpfiles = false # or "true" if the temporary directory on the remote host is mounted with POSIX acls disabled or the remote machines use ZFS. +host_key_checking = False +timeout = 60 +deprecation_warnings = False +display_skipped_hosts = False + +[ssh_connection] +pipelining = True + +[persistent_connection] +retries = 3 +connect_timeout = 60 +command_timeout = 30 \ No newline at end of file diff --git a/inventory b/inventory new file mode 100644 index 0000000..5787945 --- /dev/null +++ b/inventory @@ -0,0 +1,9 @@ +[hosts_backup] +192.168.62.211 hostname=test1 postgresql_exists=false + +[all:vars] +ansible_connection='ssh' +ansible_ssh_port='22' +ansible_user='root' +ansible_ssh_pass='root' # "sshpass" package is required for use "ansible_ssh_pass" +#ansible_ssh_private_key_file= \ No newline at end of file diff --git a/ping.yml b/ping.yml new file mode 100644 index 0000000..25b30a0 --- /dev/null +++ b/ping.yml @@ -0,0 +1,9 @@ +--- +- name: Test connection servers + hosts: all + become: yes + + tasks: + + - name: Ping servers + ping: \ No newline at end of file