aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r--fdio.infra.ansible/roles/docker/tasks/main.yaml4
-rw-r--r--fdio.infra.ansible/roles/user_add/defaults/main.yaml3
-rw-r--r--fdio.infra.ansible/roles/user_add/tasks/main.yaml2
3 files changed, 6 insertions, 3 deletions
diff --git a/fdio.infra.ansible/roles/docker/tasks/main.yaml b/fdio.infra.ansible/roles/docker/tasks/main.yaml
index 773cbf7a5b..d40e1a44c1 100644
--- a/fdio.infra.ansible/roles/docker/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/docker/tasks/main.yaml
@@ -75,11 +75,9 @@
- name: Conf - Users to Docker Group
user:
- name: "{{ item }}"
+ name: "{{ ansible_user }}"
groups: "docker"
append: True
- loop: "{{ docker_users }}"
- when: docker_users
tags:
- docker-conf-user
diff --git a/fdio.infra.ansible/roles/user_add/defaults/main.yaml b/fdio.infra.ansible/roles/user_add/defaults/main.yaml
index 56f5098f12..fc80b8aa72 100644
--- a/fdio.infra.ansible/roles/user_add/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/user_add/defaults/main.yaml
@@ -9,3 +9,6 @@ users_create_homedirs: true
# Default list of users to create.
users: []
+
+# Default enable password login.
+sshd_disable_password_login: false \ No newline at end of file
diff --git a/fdio.infra.ansible/roles/user_add/tasks/main.yaml b/fdio.infra.ansible/roles/user_add/tasks/main.yaml
index e2ef63db48..24be30dc6e 100644
--- a/fdio.infra.ansible/roles/user_add/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/user_add/tasks/main.yaml
@@ -33,5 +33,7 @@
line: "PasswordAuthentication no"
notify:
- "Restart SSHd"
+ when:
+ - sshd_disable_password_login
tags:
- user-add-conf