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
I worked up a fix (a090631) to include an empty task when there is no item that applies for any host but I see it creating an empty item task even when there is one non-empty task:
Task type Role Task Item play Run ansible-role-clamav
task Gathering Facts ok ok ok ...
task ansible-role-clamav Include OS-Specific variables ok ok ok ...
task ansible-role-clamav include_tasks
task ansible-role-clamav Define clamav_daemon. ok ok ok ...
task ansible-role-clamav Define clamav_freshclam_daemon. ok ok ok ...
task ansible-role-clamav Define clamav_packages. ok ok ok ...
task ansible-role-clamav Ensure ClamAV packages are installed. epel-release ok failed changed ...
task ansible-role-clamav Ensure ClamAV packages are installed. clamav changed failed changed ...
task ansible-role-clamav Ensure ClamAV packages are installed. clamav-update ok failed ok ...
task ansible-role-clamav Ensure ClamAV packages are installed. clamav-scanner-systemd failed failed changed ...
task ansible-role-clamav Ensure ClamAV packages are installed. clamav-base ...
task ansible-role-clamav Ensure ClamAV packages are installed. clamav-daemon ...
task ansible-role-clamav Ensure ClamAV packages are installed.
task ansible-role-clamav Run freshclam after ClamAV packages change. changed ...
task ansible-role-clamav include_tasks [2] ...
task ansible-role-clamav Ensure Freshclam service is available. changed ...
task ansible-role-clamav Reload systemd after adding service. ok ...
task ansible-role-clamav Change configuration for the ClamAV daemon. {u'regexp': u'^.*Example$', u'state': u'absent'} changed ...
task ansible-role-clamav Change configuration for the ClamAV daemon. {u'regexp': u'^.*LocalSocket .*$', u'line': u'LocalSocket /var/run/clamav/clamd.ctl'} ...
task ansible-role-clamav Change configuration for the ClamAV daemon. {u'regexp': u'^.*LocalSocket .*$', u'line': u'LocalSocket /var/run/clamd.scan/clamd.sock'} changed ...
task ansible-role-clamav Change configuration for the ClamAV daemon.
task ansible-role-clamav Ensure ClamAV daemon is running (if configured). changed ...
task ansible-role-clamav Ensure ClamAV freshclam daemon is running (if configured). changed ...
handler ansible-role-clamav restart clamav daemon
Here's the output from ansible-playbook I was parsing when this happened: stdout-fixed.txt
I tried to recreate this with ansible/no-items.yml but couldn't get it to happen:
[ubuntu@pfuntner-ubuntu ~]$ ansible-playbook -e '{"hosts": "aws-centos8,gcp-centos8", "items": ["foo", "bar"]}' ~/ansible/no-items.yml | grep -v 'gcp-centos8.*foo' | grep -v 'aws-centos8.*bar' | ansible-tasks
Task type Role Task Item aws-centos8 gcp-centos8
play Test a loop with no items
task Gathering Facts ok ok
task Before ok ok
task Loop foo ok
task Loop bar ok
task After ok ok
[ubuntu@pfuntner-ubuntu ~]$
The text was updated successfully, but these errors were encountered:
I worked up a fix (a090631) to include an empty task when there is no item that applies for any host but I see it creating an empty item task even when there is one non-empty task:
Here's the output from
ansible-playbook
I was parsing when this happened: stdout-fixed.txtI tried to recreate this with
ansible/no-items.yml
but couldn't get it to happen:The text was updated successfully, but these errors were encountered: