added base ansible dir
This commit is contained in:
parent
834ded2811
commit
828214f654
5 changed files with 30 additions and 0 deletions
6
ansible/ansible.cfg
Normal file
6
ansible/ansible.cfg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[defaults]
|
||||||
|
|
||||||
|
inventory = ./hosts
|
||||||
|
remote_user = simamur
|
||||||
|
private_key_file = ./simar-key
|
||||||
|
deprecation_warnings=False
|
||||||
0
ansible/env/vars.yml
vendored
Normal file
0
ansible/env/vars.yml
vendored
Normal file
12
ansible/hosts/inventory.yml
Normal file
12
ansible/hosts/inventory.yml
Normal file
|
|
@ -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
|
||||||
5
ansible/playbooks/ping_workers.yml
Normal file
5
ansible/playbooks/ping_workers.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
- name: Ping workers
|
||||||
|
hosts: workers
|
||||||
|
gather_facts: False
|
||||||
|
roles:
|
||||||
|
- { role: ../roles/ping }
|
||||||
7
ansible/roles/ping/tasks/main.yml
Normal file
7
ansible/roles/ping/tasks/main.yml
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue