Skip to content

Commit

Permalink
Fix when conditional for sudo_nopasswd.
Browse files Browse the repository at this point in the history
  • Loading branch information
cchurch committed Feb 9, 2015
1 parent e18b414 commit 89e370c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and remove admin users:
fullname: "Jim User"
pubkey: "ssh-rsa ..."

admin_users_sudo_nopasswd: yes
admin_users_sudo_nopasswd: true

admin_users_to_remove:
- bob
Expand All @@ -47,7 +47,7 @@ different options:
roles:
- role: cchurch.admin-users
admin_users: prod_admin_users
admin_users_sudo_nopasswd: no
admin_users_sudo_nopasswd: false

License
-------
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ admin_users: []
# fullname: "Joe User"
# pubkey: "ssh-rsa ..."

admin_users_sudo_nopasswd: yes
admin_users_sudo_nopasswd: true

admin_users_to_remove: []
# - bob
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
mode: 0440
owner: root
group: root
when: admin_users_sudo_nopasswd
when: admin_users_sudo_nopasswd|bool

- name: disable sudo with no password
file:
path: /etc/sudoers.d/sudo_nopasswd
state: absent
when: not admin_users_sudo_password
when: not admin_users_sudo_nopasswd|bool

0 comments on commit 89e370c

Please sign in to comment.