diff --git a/initial_server_setup/initial_setup.yml b/initial_server_setup/initial_setup.yml index f73d7a38e285d8cb06530fe355519413d65cac94..a3af8efdb9e2d6b2247a5438c54f079a02c93e5f 100644 --- a/initial_server_setup/initial_setup.yml +++ b/initial_server_setup/initial_setup.yml @@ -57,6 +57,7 @@ content: | # {{ ansible_managed }} PasswordAuthentication no + tags: network,ssh register: pass_auth - name: Remove SSH Password Auth from sshd_config ansible.builtin.lineinfile: @@ -73,6 +74,7 @@ content: | # {{ ansible_managed }} PermitEmptyPasswords no + tags: network,ssh register: empty_pass - name: Remove SSH Empty Password from sshd_config ansible.builtin.lineinfile: @@ -89,6 +91,7 @@ content: | # {{ ansible_managed }} PermitRootLogin no + tags: network,ssh register: root_login - name: Remove SSH Root Login from sshd_config ansible.builtin.lineinfile: @@ -141,6 +144,7 @@ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt + tags: users - name: Add SSH key for users from vars ansible.posix.authorized_key: @@ -156,6 +160,7 @@ group: sudo commands: ALL nopassword: true + tags: users - name: Reload SSHD ansible.builtin.service: