diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..9b492c4 --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,6 @@ +[defaults] + +inventory = ./hosts +remote_user = simamur +private_key_file = ./simar-key +deprecation_warnings=False \ No newline at end of file diff --git a/ansible/env/vars.yml b/ansible/env/vars.yml new file mode 100644 index 0000000..e69de29 diff --git a/ansible/hosts/inventory.yml b/ansible/hosts/inventory.yml new file mode 100644 index 0000000..245cb80 --- /dev/null +++ b/ansible/hosts/inventory.yml @@ -0,0 +1,12 @@ +fields: + children: + masters: + hosts: + master: + ansible_host: 192.168.1.94 + workers: + hosts: + worker: + ansible_host: 192.168.1.122 + astra_worker: + ansible_host: 192.168.1.9 diff --git a/ansible/playbooks/ping_workers.yml b/ansible/playbooks/ping_workers.yml new file mode 100644 index 0000000..9088d82 --- /dev/null +++ b/ansible/playbooks/ping_workers.yml @@ -0,0 +1,5 @@ +- name: Ping workers + hosts: workers + gather_facts: False + roles: + - { role: ../roles/ping } diff --git a/ansible/roles/ping/tasks/main.yml b/ansible/roles/ping/tasks/main.yml new file mode 100644 index 0000000..7d4e878 --- /dev/null +++ b/ansible/roles/ping/tasks/main.yml @@ -0,0 +1,7 @@ +- name: Test Ping + action: ping +#- name: Dump +# delegate_to: localhost +# copy: +# content: "{{ hostvars[inventory_hostname] | to_nice_json }}" +# dest: /tmp/setup-dump.json \ No newline at end of file