35 lines
529 B
YAML
35 lines
529 B
YAML
---
|
|
- 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') }}"
|
|
|
|
|
|
- name: Show the env variable for callback plugins
|
|
debug:
|
|
msg: "{{ lookup('env', 'ANSIBLE_CALLBACKS_ENABLED') }}"
|
|
|
|
|
|
...
|