Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add playbook that is chatty but changes and fails too #305

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chatty/changed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- debug:
msg: "This is a debug message that changes: {{ item }}"
changed_when: true
23 changes: 23 additions & 0 deletions chatty/chatty_changed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---

- hosts: all
gather_facts: false
vars:
num_messages: 50
num_changed: 50
num_failed: 50
tasks:
- debug:
msg: "This is a debug message: {{ item }}"
with_sequence: 'count={{ num_messages }}'

- include_tasks: changed.yml
with_sequence: 'count={{ num_changed }}'

- debug:
msg: "This is a debug message that fails"
failed_when: true

# BUG: this is not working in AWX
# - include_tasks: failed.yml
# with_sequence: 'count={{ num_changed }}'
3 changes: 3 additions & 0 deletions chatty/failed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- debug:
msg: "This is a debug message that fails: {{ item }}"
failed_when: true
22 changes: 22 additions & 0 deletions chatty_changed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

- hosts: all
gather_facts: false
vars:
num_messages: 50
num_changed: 50
num_failed: 50
tasks:
- debug:
msg: "This is a debug message: {{ item }}"
with_sequence: 'count={{ num_messages }}'

- debug:
msg: "This is a debug message that changes: {{ item }}"
with_sequence: 'count={{ num_changed }}'
changed_when: true

- debug:
msg: "This is a debug message that fails: {{ item }}"
with_sequence: 'count={{ num_failed }}'
failed_when: true