Changeset - 575ae5996f86
[Not reviewed]
0 1 0
x - 20 months ago 2023-08-24 01:50:34
xbr@c3l.lu
fix: use name for removal sshd_config actions
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
initial_server_setup/initial_setup.yml
Show inline comments
 
@@ -57,6 +57,7 @@
 
        content: |
 
          # {{ ansible_managed }}
 
          PasswordAuthentication no
 
    - name: Remove SSH Password Auth from sshd_config
 
      ansible.builtin.lineinfile:
 
        path: /etc/ssh/sshd_config
 
        regex: "^PasswordAuthentication"
 
@@ -70,6 +71,7 @@
 
        content: |
 
          # {{ ansible_managed }}
 
          PermitEmptyPasswords no
 
    - name: Remove SSH Empty Password from sshd_config
 
      ansible.builtin.lineinfile:
 
        path: /etc/ssh/sshd_config
 
        regex: "^PermitEmptyPasswords"
 
@@ -83,6 +85,7 @@
 
        content: |
 
          # {{ ansible_managed }}
 
          PermitRootLogin no
 
    - name: Remove SSH Root Login from sshd_config
 
      ansible.builtin.lineinfile:
 
        path: /etc/ssh/sshd_config
 
        regex: "^PermitRootLogin"
0 comments (0 inline, 0 general)