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
If a role is included conditionally, then any run_once task in it may be skipped if the first host that is running the play doesn't meet the condition.
STEPS TO REPRODUCE
foo.yml
---
- hosts: all
gather_facts: no
roles:
- role: p
when: inventory_hostname == 'c'
closing as dupe of #13226, this is a consequence of run_once running on the first active host in the run, so the when condition evaluates relative to that host.
ISSUE TYPE
COMPONENT NAME
core
ANSIBLE VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
If a role is included conditionally, then any
run_once
task in it may be skipped if the first host that is running the play doesn't meet the condition.STEPS TO REPRODUCE
foo.yml
roles/p/tasks/main.yml:
I did this:
EXPECTED RESULTS
I expected the task to be executed on 'c'.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: