issue #338: run /etc/environment test with become:true.

pull/350/head
David Wilson 6 years ago
parent ad365dad56
commit 8eb288856c

@ -7,10 +7,6 @@
any_errors_fatal: true any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- meta: end_play
when: ansible_virtualization_type != "docker"
# ~/.pam_environment # ~/.pam_environment
- file: - file:
@ -38,10 +34,14 @@
path: ~/.pam_environment path: ~/.pam_environment
state: absent state: absent
# /etc/environment # /etc/environment
- meta: end_play
when: ansible_virtualization_type != "docker"
- file: - file:
path: /etc/environment path: /etc/environment
become: true
state: absent state: absent
- shell: echo $MAGIC_ETC_ENV - shell: echo $MAGIC_ETC_ENV
@ -52,6 +52,7 @@
- copy: - copy:
dest: /etc/environment dest: /etc/environment
become: true
content: | content: |
MAGIC_ETC_ENV=555 MAGIC_ETC_ENV=555
@ -63,4 +64,5 @@
- file: - file:
path: /etc/environment path: /etc/environment
become: true
state: absent state: absent

Loading…
Cancel
Save