From 8eb288856c84a7017e59d1c7fa5d0e25a6bd95b4 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 12 Aug 2018 12:44:57 +0100 Subject: [PATCH] issue #338: run /etc/environment test with become:true. --- tests/ansible/integration/runner/etc_environment.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ansible/integration/runner/etc_environment.yml b/tests/ansible/integration/runner/etc_environment.yml index 4c7f64d8..c1195b75 100644 --- a/tests/ansible/integration/runner/etc_environment.yml +++ b/tests/ansible/integration/runner/etc_environment.yml @@ -7,10 +7,6 @@ any_errors_fatal: true gather_facts: true tasks: - - meta: end_play - when: ansible_virtualization_type != "docker" - - # ~/.pam_environment - file: @@ -38,10 +34,14 @@ path: ~/.pam_environment state: absent + # /etc/environment + - meta: end_play + when: ansible_virtualization_type != "docker" - file: path: /etc/environment + become: true state: absent - shell: echo $MAGIC_ETC_ENV @@ -52,6 +52,7 @@ - copy: dest: /etc/environment + become: true content: | MAGIC_ETC_ENV=555 @@ -63,4 +64,5 @@ - file: path: /etc/environment + become: true state: absent