blob: 6a31ff8d46b2b92cd307b6902cfc4259d8a3d863 [file] [log] [blame]
- name: Run some commands to show that logging works
hosts: node
tasks:
- name: Run setup
setup:
register: setupvar
- name: Output debug for a var
debug:
var: setupvar
- name: Run a shell task
command: ip addr show
- name: Loop with items
command: "echo {{ item }}"
with_items:
- item1
- item2
- item3
- name: Loop with complex items
command: "echo {{ item.name }}"
with_items:
- name: complex1
- name: complex2
- name: complex3
- name: Run a shell task with an ansible python exception
command: echo foo
args:
chdir: /shelltask/somewhere/that/does/not/exist
failed_when: false
- name: Loop with items on an ansible python exception
command: "echo {{ item }}"
with_items:
- item1
- item2
- item3
args:
chdir: /itemloop/somewhere/that/does/not/exist
failed_when: false