Skip to content

Commit 6bf58c3

Browse files
committed
tests: Don't add local user to Docker containers
1 parent a8e8cf9 commit 6bf58c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/image_prep/_user_accounts.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
with_items:
169169
- mitogen__pw_required
170170
- mitogen__require_tty_pw_required
171+
when:
172+
- ansible_virtualization_type != "docker"
171173

172174
- name: Allow passwordless sudo for require_tty/readonly_homedir
173175
lineinfile:
@@ -177,10 +179,14 @@
177179
with_items:
178180
- mitogen__require_tty
179181
- mitogen__readonly_homedir
182+
when:
183+
- ansible_virtualization_type != "docker"
180184

181185
- name: Allow passwordless for many accounts
182186
lineinfile:
183187
path: /etc/sudoers
184188
line: "{{lookup('pipe', 'whoami')}} ALL = (mitogen__{{item}}:ALL) NOPASSWD:ALL"
185189
validate: '/usr/sbin/visudo -cf %s'
186190
with_items: "{{normal_users}}"
191+
when:
192+
- ansible_virtualization_type != "docker"

0 commit comments

Comments
 (0)