Initial ansible structure and test code
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# ignore installed roles/collections
|
||||||
|
collections/
|
||||||
|
roles/
|
||||||
14
ansible.cfg
Normal file
14
ansible.cfg
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[defaults]
|
||||||
|
|
||||||
|
inventory = ./inventories/hosts.ini
|
||||||
|
roles_path = ./roles
|
||||||
|
collections_paths = ./collections
|
||||||
|
host_key_checking = False
|
||||||
|
retry_files_enabled = False
|
||||||
|
timeout = 30
|
||||||
|
forks = 10
|
||||||
|
|
||||||
|
[privilege_escalation]
|
||||||
|
become = True
|
||||||
|
become_method = sudo
|
||||||
|
#become_ask_pass = False
|
||||||
12
inventories/hosts.ini
Normal file
12
inventories/hosts.ini
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[control]
|
||||||
|
mustafar ansible_host=mustafar
|
||||||
|
|
||||||
|
[web]
|
||||||
|
lb-v3 ansible_host=lb-v3.int.metaunix.net
|
||||||
|
ks-v2 ansible_host=ks-v2.int.metaunix.net
|
||||||
|
|
||||||
|
[nameservers]
|
||||||
|
#ns1 ansible_host=ns1.int.metaunix.net
|
||||||
|
#ns2 ansible_host=ns2.int.metaunix.net
|
||||||
|
ns3 ansible_host=ns3.int.metaunix.net
|
||||||
|
ns4 ansible_host=ns4.int.metaunix.net
|
||||||
6
playbooks/ping.yml
Normal file
6
playbooks/ping.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- name: Test connectivity
|
||||||
|
hosts: all
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Ping hosts
|
||||||
|
ansible.builtin.ping:
|
||||||
3
requirements.yml
Normal file
3
requirements.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
collections:
|
||||||
|
- name: ansible.posix
|
||||||
|
- name: community.general
|
||||||
Reference in New Issue
Block a user