summaryrefslogtreecommitdiffstats
path: root/molecule/ubuntu
diff options
context:
space:
mode:
Diffstat (limited to 'molecule/ubuntu')
-rw-r--r--molecule/ubuntu/Dockerfile.j24
-rw-r--r--molecule/ubuntu/converge.yml1
2 files changed, 5 insertions, 0 deletions
diff --git a/molecule/ubuntu/Dockerfile.j2 b/molecule/ubuntu/Dockerfile.j2
index 64070d4d..4c8e5c8c 100644
--- a/molecule/ubuntu/Dockerfile.j2
+++ b/molecule/ubuntu/Dockerfile.j2
@@ -25,6 +25,10 @@ RUN rm -f /lib/systemd/system/getty.target
# Mimic Ubuntu OS default boot (for testing)
RUN systemctl enable avahi-daemon
+# Enable passwordless sudo for test_group (created by the user role)
+RUN echo '%test_group ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/test_group && \
+ chmod 0440 /etc/sudoers.d/test_group
+
VOLUME ["/sys/fs/cgroup", "/tmp", "/run", "/opt"]
CMD ["/lib/systemd/systemd"]
diff --git a/molecule/ubuntu/converge.yml b/molecule/ubuntu/converge.yml
index 25b2a186..1052b483 100644
--- a/molecule/ubuntu/converge.yml
+++ b/molecule/ubuntu/converge.yml
@@ -20,6 +20,7 @@
- name: "Configure"
hosts: "ubuntu"
gather_facts: true
+ remote_user: "{{ username }}"
environment:
PATH: "{{ ansible_env.HOME }}/.local/bin:{{ ansible_env.PATH }}"
vars: