Initial ansible structure and test code

This commit is contained in:
2026-04-02 12:28:20 -04:00
commit 253618c152
5 changed files with 38 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# ignore installed roles/collections
collections/
roles/

14
ansible.cfg Normal file
View 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
View 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
View File

@@ -0,0 +1,6 @@
- name: Test connectivity
hosts: all
tasks:
- name: Ping hosts
ansible.builtin.ping:

3
requirements.yml Normal file
View File

@@ -0,0 +1,3 @@
collections:
- name: ansible.posix
- name: community.general