Variables that are brought into scope through the "register: var" when a task is executed are not available when a playbook is run with the --check mode.
The work-around I have been using is to put defaults (for all those variables that will eventually be brought into scope using register) using set_fact or group_vars/all or an included var file. I suggest changing the ansible --check mode to not evaluate those variables, in the when clause, normally brought into scope using register. Does anyone else have this problem? Did you use another work around? Do you like my idea of selectively evaluating variables that are "registered"? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b37591be-6ff8-4a25-99a9-eb24ef5a924b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
