Remove the right file in revoke-sudo

Also fix the negative test to use shell instead of command, so that
! is parsed as intended.

Change-Id: I9f9dd60a895798cc639863a36b921b64621f6767
This commit is contained in:
Monty Taylor 2017-09-28 14:11:21 -05:00 committed by Jeremy Stanley
parent 4aa181a77c
commit 20aed09893
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Remove sudo access for the Zuul user.
If the file ``/etc/sudoers.d/zuul-sudo`` exists, then it will be
If the file ``/etc/sudoers.d/zuul`` exists, then it will be
removed. This is to facilitate systems which may use the same image
for tests which require sudo and those which do not.

View File

@ -1,8 +1,8 @@
- name: Remove sudo access for zuul user.
become: yes
file:
path: /etc/sudoers.d/zuul-sudo
path: /etc/sudoers.d/zuul
state: absent
- name: Prove that general sudo access is actually revoked.
command: ! sudo -n true
shell: '! sudo -n true'