Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. - set_fact:
  2. user_sudo_values: |
  3. [{% for item in user_sudo_result.results %}
  4. {
  5. "key": "{{ item.item }}",
  6. "value": "{{ item.rc != 1 and item.stdout != "" and "is not allowed to run sudo on" not in item.stdout }}"
  7. }
  8. {% endfor %}]
  9.  
  10. - set_fact:
  11. user_sudo: "{{ user_sudo_values }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement