mirror of https://github.com/ansible/ansible.git
Merge 6f60c9eed6 into 7b4d4ed672
commit
bec3da00e4
@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- default callback - add ``display_included_hosts`` option to control the ``included:`` banner lines for ``include_tasks``/``include_role``.
|
||||
@ -0,0 +1,2 @@
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
@ -0,0 +1,130 @@
|
||||
|
||||
PLAY [testhost] ****************************************************************
|
||||
|
||||
TASK [Changed task] ************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Ok task] *****************************************************************
|
||||
ok: [testhost]
|
||||
|
||||
TASK [Failed task] *************************************************************
|
||||
[ERROR]: Task failed: Action failed: no reason
|
||||
Origin: TEST_PATH/test.yml:16:7
|
||||
|
||||
14 changed_when: false
|
||||
15
|
||||
16 - name: Failed task
|
||||
^ column 7
|
||||
|
||||
fatal: [testhost]: FAILED! => {"changed": false, "msg": "no reason"}
|
||||
...ignoring
|
||||
|
||||
TASK [Skipped task] ************************************************************
|
||||
skipping: [testhost]
|
||||
|
||||
TASK [Task with var in name (foo bar)] *****************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Loop task] ***************************************************************
|
||||
changed: [testhost] => (item=foo-1)
|
||||
changed: [testhost] => (item=foo-2)
|
||||
changed: [testhost] => (item=foo-3)
|
||||
|
||||
TASK [debug loop] **************************************************************
|
||||
changed: [testhost] => (item=debug-1) => {
|
||||
"msg": "debug-1"
|
||||
}
|
||||
[ERROR]: Task failed: Action failed: debug-2
|
||||
Origin: TEST_PATH/test.yml:38:7
|
||||
|
||||
36
|
||||
37 # detect "changed" debug tasks being hidden with display_ok_tasks=false
|
||||
38 - name: debug loop
|
||||
^ column 7
|
||||
|
||||
failed: [testhost] (item=debug-2) => {
|
||||
"msg": "debug-2"
|
||||
}
|
||||
ok: [testhost] => (item=debug-3) => {
|
||||
"msg": "debug-3"
|
||||
}
|
||||
skipping: [testhost] => (item=debug-4)
|
||||
fatal: [testhost]: FAILED! => {"msg": "One or more items failed"}
|
||||
...ignoring
|
||||
|
||||
TASK [EXPECTED FAILURE Failed task to be rescued] ******************************
|
||||
[ERROR]: Task failed: Action failed: Failed as requested from task
|
||||
Origin: TEST_PATH/test.yml:54:11
|
||||
|
||||
52
|
||||
53 - block:
|
||||
54 - name: EXPECTED FAILURE Failed task to be rescued
|
||||
^ column 11
|
||||
|
||||
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
|
||||
|
||||
TASK [Rescue task] *************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [include_tasks] ***********************************************************
|
||||
|
||||
TASK [debug] *******************************************************************
|
||||
ok: [testhost] => {
|
||||
"item": 1
|
||||
}
|
||||
|
||||
TASK [copy] ********************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [replace] *****************************************************************
|
||||
--- before: .../test_diff.txt
|
||||
+++ after: .../test_diff.txt
|
||||
@@ -1 +1 @@
|
||||
-foo
|
||||
\ No newline at end of file
|
||||
+bar
|
||||
\ No newline at end of file
|
||||
|
||||
changed: [testhost]
|
||||
|
||||
TASK [replace] *****************************************************************
|
||||
ok: [testhost]
|
||||
|
||||
TASK [debug] *******************************************************************
|
||||
skipping: [testhost]
|
||||
|
||||
TASK [debug] *******************************************************************
|
||||
skipping: [testhost]
|
||||
|
||||
TASK [debug] *******************************************************************
|
||||
skipping: [testhost] => (item=1)
|
||||
skipping: [testhost] => (item=2)
|
||||
skipping: [testhost]
|
||||
|
||||
RUNNING HANDLER [Test handler 1] ***********************************************
|
||||
changed: [testhost]
|
||||
|
||||
RUNNING HANDLER [Test handler 2] ***********************************************
|
||||
ok: [testhost]
|
||||
|
||||
RUNNING HANDLER [Test handler 3] ***********************************************
|
||||
changed: [testhost]
|
||||
|
||||
PLAY [testhost] ****************************************************************
|
||||
|
||||
TASK [First free task] *********************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Second free task] ********************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Include some tasks] ******************************************************
|
||||
|
||||
TASK [debug] *******************************************************************
|
||||
ok: [testhost] => {
|
||||
"item": 1
|
||||
}
|
||||
|
||||
PLAY RECAP *********************************************************************
|
||||
testhost : ok=19 changed=11 unreachable=0 failed=0 skipped=4 rescued=1 ignored=2
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
@ -0,0 +1,93 @@
|
||||
|
||||
PLAY [testhost] ****************************************************************
|
||||
|
||||
TASK [Changed task] ************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Failed task] *************************************************************
|
||||
[ERROR]: Task failed: Action failed: no reason
|
||||
Origin: TEST_PATH/test.yml:16:7
|
||||
|
||||
14 changed_when: false
|
||||
15
|
||||
16 - name: Failed task
|
||||
^ column 7
|
||||
|
||||
fatal: [testhost]: FAILED! => {"changed": false, "msg": "no reason"}
|
||||
...ignoring
|
||||
|
||||
TASK [Task with var in name (foo bar)] *****************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Loop task] ***************************************************************
|
||||
changed: [testhost] => (item=foo-1)
|
||||
changed: [testhost] => (item=foo-2)
|
||||
changed: [testhost] => (item=foo-3)
|
||||
|
||||
TASK [debug loop] **************************************************************
|
||||
changed: [testhost] => (item=debug-1) => {
|
||||
"msg": "debug-1"
|
||||
}
|
||||
[ERROR]: Task failed: Action failed: debug-2
|
||||
Origin: TEST_PATH/test.yml:38:7
|
||||
|
||||
36
|
||||
37 # detect "changed" debug tasks being hidden with display_ok_tasks=false
|
||||
38 - name: debug loop
|
||||
^ column 7
|
||||
|
||||
failed: [testhost] (item=debug-2) => {
|
||||
"msg": "debug-2"
|
||||
}
|
||||
fatal: [testhost]: FAILED! => {"msg": "One or more items failed"}
|
||||
...ignoring
|
||||
|
||||
TASK [EXPECTED FAILURE Failed task to be rescued] ******************************
|
||||
[ERROR]: Task failed: Action failed: Failed as requested from task
|
||||
Origin: TEST_PATH/test.yml:54:11
|
||||
|
||||
52
|
||||
53 - block:
|
||||
54 - name: EXPECTED FAILURE Failed task to be rescued
|
||||
^ column 11
|
||||
|
||||
fatal: [testhost]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
|
||||
|
||||
TASK [Rescue task] *************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [include_tasks] ***********************************************************
|
||||
|
||||
TASK [copy] ********************************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [replace] *****************************************************************
|
||||
--- before: .../test_diff.txt
|
||||
+++ after: .../test_diff.txt
|
||||
@@ -1 +1 @@
|
||||
-foo
|
||||
\ No newline at end of file
|
||||
+bar
|
||||
\ No newline at end of file
|
||||
|
||||
changed: [testhost]
|
||||
|
||||
RUNNING HANDLER [Test handler 1] ***********************************************
|
||||
changed: [testhost]
|
||||
|
||||
RUNNING HANDLER [Test handler 3] ***********************************************
|
||||
changed: [testhost]
|
||||
|
||||
PLAY [testhost] ****************************************************************
|
||||
|
||||
TASK [First free task] *********************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Second free task] ********************************************************
|
||||
changed: [testhost]
|
||||
|
||||
TASK [Include some tasks] ******************************************************
|
||||
|
||||
PLAY RECAP *********************************************************************
|
||||
testhost : ok=19 changed=11 unreachable=0 failed=0 skipped=4 rescued=1 ignored=2
|
||||
|
||||
Loading…
Reference in New Issue