diff options
Diffstat (limited to 'fdio.infra.ansible/roles/user_add/tasks/main.yaml')
-rw-r--r-- | fdio.infra.ansible/roles/user_add/tasks/main.yaml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fdio.infra.ansible/roles/user_add/tasks/main.yaml b/fdio.infra.ansible/roles/user_add/tasks/main.yaml index 329c6abd07..c01a1497d8 100644 --- a/fdio.infra.ansible/roles/user_add/tasks/main.yaml +++ b/fdio.infra.ansible/roles/user_add/tasks/main.yaml @@ -1,7 +1,7 @@ --- -# file: roles/user_add/tasks/main.yaml +# file: tasks/main.yaml -- name: Conf - Add User +- name: Add User ansible.builtin.user: append: "{{ item.append | default(omit) }}" createhome: "{{ 'yes' if users_create_homedirs else 'no' }}" @@ -15,7 +15,7 @@ tags: - user-add-conf -- name: Conf - SSH keys +- name: SSH keys ansible.builtin.authorized_key: user: "{{ item.0.username }}" key: "{{ item.1 }}" @@ -26,13 +26,11 @@ tags: - user-add-conf -- name: Conf - Disable Password Login +- name: Disable Password Login ansible.builtin.lineinfile: dest: "/etc/ssh/sshd_config" regexp: "^PasswordAuthentication yes" line: "PasswordAuthentication no" - notify: - - "Restart SSHd" when: - sshd_disable_password_login tags: |