From 20aed09893a52c2550eb7ed27e2fc2ca3d2ce669 Mon Sep 17 00:00:00 2001 From: Monty Taylor <mordred@inaugust.com> Date: Thu, 28 Sep 2017 14:11:21 -0500 Subject: [PATCH] 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 --- roles/revoke-sudo/README.rst | 2 +- roles/revoke-sudo/tasks/main.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/revoke-sudo/README.rst b/roles/revoke-sudo/README.rst index 99e9d2b8b..3ac21cb9b 100644 --- a/roles/revoke-sudo/README.rst +++ b/roles/revoke-sudo/README.rst @@ -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. diff --git a/roles/revoke-sudo/tasks/main.yaml b/roles/revoke-sudo/tasks/main.yaml index 2f7be669f..f97c6ede1 100644 --- a/roles/revoke-sudo/tasks/main.yaml +++ b/roles/revoke-sudo/tasks/main.yaml @@ -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'