add test play, add .gitignore, update ansible.cfg, update hosts
This commit is contained in:
parent
2d97fbda12
commit
c0ee091d15
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
collections
|
||||||
|
facts.d
|
@ -1,7 +1,7 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
inventory = hosts
|
inventory = hosts
|
||||||
roles_path = roles
|
roles_path = roles
|
||||||
collections_path = collections
|
collections_path = /etc/ansible/collections
|
||||||
remote_tmp = /tmp/.ansible-${USER}/tmp
|
remote_tmp = /tmp/.ansible-${USER}/tmp
|
||||||
gathering = smart
|
gathering = smart
|
||||||
gather_timeout = 300
|
gather_timeout = 300
|
||||||
@ -15,7 +15,7 @@ timeout = 30
|
|||||||
host_key_checking = False
|
host_key_checking = False
|
||||||
display_skipped_hosts = False
|
display_skipped_hosts = False
|
||||||
bin_ansible_callbacks = True
|
bin_ansible_callbacks = True
|
||||||
callback_whitelist = ansible.posix.profile_tasks, ansible.posix.timer
|
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
|
||||||
deprecation_warnings = False
|
deprecation_warnings = False
|
||||||
command_warnings = False
|
command_warnings = False
|
||||||
#strategy = free
|
#strategy = free
|
||||||
|
6
hosts
6
hosts
@ -17,6 +17,10 @@ lab-dev-15 ansible_host=10.10.42.177
|
|||||||
lab-dev-16 ansible_host=10.10.42.133
|
lab-dev-16 ansible_host=10.10.42.133
|
||||||
lab-dev-17 ansible_host=10.10.42.179
|
lab-dev-17 ansible_host=10.10.42.179
|
||||||
lab-dev-18 ansible_host=10.10.42.165
|
lab-dev-18 ansible_host=10.10.42.165
|
||||||
lab-dev-19 ansible_host=10.10.42.188
|
lab-dev-19 ansible_host=10.10.42.188 ansible_user=broken
|
||||||
lab-dev-20 ansible_host=10.10.42.142
|
lab-dev-20 ansible_host=10.10.42.142
|
||||||
|
|
||||||
|
|
||||||
|
[dev:vars]
|
||||||
|
ansible_user=root
|
||||||
|
|
||||||
|
29
test.yml
Normal file
29
test.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
- name: Perform some tests
|
||||||
|
hosts: all
|
||||||
|
become: no
|
||||||
|
gather_facts: no
|
||||||
|
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Do a debug thing
|
||||||
|
debug:
|
||||||
|
msg: "Hello world!"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Run a command
|
||||||
|
command:
|
||||||
|
cmd: uptime
|
||||||
|
register: r_cmd_1
|
||||||
|
|
||||||
|
|
||||||
|
- name: Clear errors if any
|
||||||
|
meta: clear_host_errors
|
||||||
|
|
||||||
|
|
||||||
|
- name: Show command output
|
||||||
|
debug:
|
||||||
|
msg: "{{ r_cmd_1.stdout | default('plop plop plop') }}"
|
||||||
|
|
||||||
|
|
||||||
|
...
|
Loading…
x
Reference in New Issue
Block a user