Files
tower-tests/machine-test.yml
2022-02-09 11:53:19 -05:00

32 lines
670 B
YAML

---
- name: Tests machine connections via Ansible Tower/Ansible Automation Platform
hosts: all
gather_facts: no
become: no
tasks:
- name: Run tests against various hosts
block:
- name: "Test #1 - whoami"
command :
cmd : whoami
register : r_cmd_whoami
- name: "Results #1 - whoami"
debug:
msg:
- "rc : {{ r_cmd_whoami.rc }}"
- "stdout : {{ r_cmd_whoami.stdout }}"
- "stderr : {{ r_cmd_whoami.stderr }}"
- name: "Test #2 - Copy file to machine"
copy:
src : files/hello-ansible.txt
dest : /tmp/hello-ansible.txt
...