You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After working on #84, I noticed the ansible-playbook is a little inconsistent about the status of tasks on a node:
$ ansible-tasks < install-toys.txt
Task type Role Task Item aws-amazon1 aws-amazon2 aws-rh8
task Gathering Facts ok ok ok
task Query peon home directory changed changed changed
task Capture peon home directory ok ok ok
task Display peon home directory ok ok ok
task Install packages python3 failed changed changed
task Install packages git changed changed changed
task Create /home/ec2-user/repos directory changed changed
task Test for /home/ec2-user/repos/toys directory changed changed
task Clone toys repository changed changed
task Create /home/ec2-user/bin symlink changed changed
task Test for /home/ec2-user/.bash_profile ok ok
task Use /home/ec2-user/.bash_profile ok ok
task Test for /home/ec2-user/.bash_login skipping skipping
task Use /home/ec2-user/.bash_login skipping skipping
task Test for toys changes to /home/ec2-user/.bash_profile changed changed
task Make changes to /home/ec2-user/.bash_profile changed changed
task Make changes to /home/ec2-user/.bashrc fatal fatal
2020-10-18 10:42:01,721 WARNING /home/mrbruno/bin/ansible-tasks:142 Ansible playbooks have ended
$ grep ^fa install-toys.txt
failed: [aws-amazon1] (item=python3) => {"ansible_loop_var": "item", "changed": false, "item": "python3", "msg": "No package matching 'python3' found available, installed or updated", "rc": 126, "results": ["No package matching 'python3' found available, installed or updated"]}
fatal: [aws-amazon2]: FAILED! => {"changed": true, "cmd": "cat '/home/ec2-user/repos/toys/misc/.bash_rc' >> '/home/ec2-user/.bashrc'", "delta": "0:00:00.003764", "end": "2020-10-18 13:42:04.663519", "msg": "non-zero return code", "rc": 1, "start": "2020-10-18 13:42:04.659755", "stderr": "cat: /home/ec2-user/repos/toys/misc/.bash_rc: No such file or directory", "stderr_lines": ["cat: /home/ec2-user/repos/toys/misc/.bash_rc: No such file or directory"], "stdout": "", "stdout_lines": []}
fatal: [aws-rh8]: FAILED! => {"changed": true, "cmd": "cat '/home/ec2-user/repos/toys/misc/.bash_rc' >> '/home/ec2-user/.bashrc'", "delta": "0:00:00.005289", "end": "2020-10-18 13:42:04.813624", "msg": "non-zero return code", "rc": 1, "start": "2020-10-18 13:42:04.808335", "stderr": "cat: /home/ec2-user/repos/toys/misc/.bash_rc: No such file or directory", "stderr_lines": ["cat: /home/ec2-user/repos/toys/misc/.bash_rc: No such file or directory"], "stdout": "", "stdout_lines": []}
$
This is not really a bug in my script but something I might want to fix to adapt to ansible-playbook. It should be an easy fix to normalize the status to fatal or failed... or maybe something else? I don't think there's really a distinction so there's no reason for them to be different. On the other hand, If I change the status, could that confuse things if I try to correlate the output of ansible-tasks back with the original input file? I don't think I usually do that but it's possible that changing the status could become problematic.
I'm using Ansible 2.9.6 and here's the output file: install-toys.txt
The text was updated successfully, but these errors were encountered:
After working on #84, I noticed the
ansible-playbook
is a little inconsistent about the status of tasks on a node:This is not really a bug in my script but something I might want to fix to adapt to
ansible-playbook
. It should be an easy fix to normalize the status tofatal
orfailed
... or maybe something else? I don't think there's really a distinction so there's no reason for them to be different. On the other hand, If I change the status, could that confuse things if I try to correlate the output ofansible-tasks
back with the original input file? I don't think I usually do that but it's possible that changing the status could become problematic.I'm using Ansible 2.9.6 and here's the output file: install-toys.txt
The text was updated successfully, but these errors were encountered: