Need Ansible help on error. Same ansible module/task getting error in 1
environment and completely fine in another. Dunno what the causes are.
Here's the error:
fatal: [hostname.com]: FAILED! => {"msg": "The conditional check ''failed'
in prereq.stdout_lines' failed. The error was: error while evaluating
conditional ('failed' in prereq.stdout_lines): Unable to look up a name or
access an attribute in template string ({% if 'failed' in
prereq.stdout_lines %} True {% else %} False {% endif %}).\nMake sure your
variable name does not contain invalid characters like '-': argument of
type 'StrictUndefined' is not iterable"}
here's task snippet:
- name: Check for patch conflicts
shell: ./patch_command {{ patch_directory }}/{{ patchid }}
environment: "{{ env }}"
args:
chdir: "{{ patch_directory }}"
when: patchid != 'nopatch'
register: prereq
failed_when: "'failed' in prereq.stdout_lines"
--
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/83e6d170-5ce3-412f-99df-88f40c2e1ce8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.