I have the following defined in group_vars and I'm trying to run a task
when the state is defined as present and the syntax is baffling me:
staff:
- { netid: user001, uid: 12345, comment: "Chris Short", state: present }
- { netid: user002, uid: 12346, comment: "Bob Jones", state: absent }
The play is like this:
- name: Do Something
shell: script.sh
with_items:
- "{{ oristaff }}"
when: ori_staff.state == 'present'
I've tried several different ways to ascertain state and none of them have
worked so far.
--
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/bd39b2ef-d21f-4322-89f8-5205bee1f38e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.