diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c08b796 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +collections +facts.d diff --git a/ansible.cfg b/ansible.cfg index 8f1a363..492ac74 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,7 +1,7 @@ [defaults] inventory = hosts roles_path = roles -collections_path = collections +collections_path = /etc/ansible/collections remote_tmp = /tmp/.ansible-${USER}/tmp gathering = smart gather_timeout = 300 @@ -15,7 +15,7 @@ timeout = 30 host_key_checking = False display_skipped_hosts = False 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 command_warnings = False #strategy = free diff --git a/hosts b/hosts index 662dccb..369a815 100644 --- a/hosts +++ b/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-17 ansible_host=10.10.42.179 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 + +[dev:vars] +ansible_user=root + diff --git a/test.yml b/test.yml new file mode 100644 index 0000000..50ab6d5 --- /dev/null +++ b/test.yml @@ -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') }}" + + +...