Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LD_CLASS="app"
- LD_LOC="dfw"
- LD_ENV="prod"
- -name: user1
- uid: 60001
- gid: 60001
- class: app
- location: any
- env: dev
- -name: user2
- uid: 60002
- gid: 60002
- class: app
- location: dfw
- env: prod
- - user:
- name: '{{ item.name }}'
- state: '{ (If $LD_LOC matches location variable, or is set to any) & ($LD_ENV matches env variable, or is set to any) & ($LD_CLASS matches class variable, or is set to any) } present{% else %}absent{% endif %}'
- uid: '{{ item.uid }}'
- with_items: users
Add Comment
Please, Sign In to add comment