From 6bf58c3cfb0d75b901bc5e71fd18bdf449208819 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sun, 21 Feb 2021 20:47:36 +0000 Subject: [PATCH] tests: Don't add local user to Docker containers --- tests/image_prep/_user_accounts.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/image_prep/_user_accounts.yml b/tests/image_prep/_user_accounts.yml index 5fc97714..6224b61a 100644 --- a/tests/image_prep/_user_accounts.yml +++ b/tests/image_prep/_user_accounts.yml @@ -168,6 +168,8 @@ with_items: - mitogen__pw_required - mitogen__require_tty_pw_required + when: + - ansible_virtualization_type != "docker" - name: Allow passwordless sudo for require_tty/readonly_homedir lineinfile: @@ -177,6 +179,8 @@ with_items: - mitogen__require_tty - mitogen__readonly_homedir + when: + - ansible_virtualization_type != "docker" - name: Allow passwordless for many accounts lineinfile: @@ -184,3 +188,5 @@ line: "{{lookup('pipe', 'whoami')}} ALL = (mitogen__{{item}}:ALL) NOPASSWD:ALL" validate: '/usr/sbin/visudo -cf %s' with_items: "{{normal_users}}" + when: + - ansible_virtualization_type != "docker"