diff --git a/roles/sshd/tasks/algorithms.yml b/roles/sshd/tasks/algorithms.yml index 4de445f..46c52da 100644 --- a/roles/sshd/tasks/algorithms.yml +++ b/roles/sshd/tasks/algorithms.yml @@ -1,6 +1,6 @@ --- # next task requires this directory to exist for sshd -t flag -- name: Ensure /run/sshd exists +- name: "Algorithms | Ensure /run/sshd exists" ansible.builtin.file: path: /run/sshd state: directory diff --git a/roles/sshd/tasks/authentication.yml b/roles/sshd/tasks/authentication.yml index bda73c4..192a53f 100644 --- a/roles/sshd/tasks/authentication.yml +++ b/roles/sshd/tasks/authentication.yml @@ -1,5 +1,5 @@ --- -- name: "Authentication | Configure SSH authentication settings" +- name: "Authentication | configure SSH authentication settings" notify: "Restart ssh" loop: - { regexp: '^#?\s*PubkeyAuthentication\s+', line: 'PubkeyAuthentication yes' } @@ -17,7 +17,7 @@ line: "{{ item.line }}" validate: /usr/sbin/sshd -t -f %s -- name: "Check if there is an SSH config forced by cloud-init" +- name: "Authentication | check if there is an SSH config forced by cloud-init" register: sshd_cloud_init ansible.builtin.stat: path: "/etc/ssh/sshd_config.d/50-cloud-init.conf" diff --git a/roles/sshd/tasks/install.yml b/roles/sshd/tasks/install.yml index 5e86395..5d32274 100644 --- a/roles/sshd/tasks/install.yml +++ b/roles/sshd/tasks/install.yml @@ -5,7 +5,7 @@ name: openssh-server state: installed -- name: "Install | Install OpenSSH server (Debian flavours)" +- name: "Install | install OpenSSH server (Debian flavours)" when: ansible_os_family == "Debian" ansible.builtin.apt: name: openssh-server diff --git a/roles/sshd/tasks/restrictions.yml b/roles/sshd/tasks/restrictions.yml index 1d6f0c2..5186ba8 100644 --- a/roles/sshd/tasks/restrictions.yml +++ b/roles/sshd/tasks/restrictions.yml @@ -1,5 +1,5 @@ --- -- name: "Restrictions | Configure SSH security restrictions" +- name: "Restrictions | configure SSH security restrictions" loop: - { regexp: '^#?Protocol\s+', line: 'Protocol 2' } - { regexp: '^#?\s*PermitRootLogin\s+', line: 'PermitRootLogin no' } diff --git a/roles/sshd/tasks/whitelists.yml b/roles/sshd/tasks/whitelists.yml index 03f0136..47e83d4 100644 --- a/roles/sshd/tasks/whitelists.yml +++ b/roles/sshd/tasks/whitelists.yml @@ -1,5 +1,5 @@ --- -- name: "Configure AllowUsers" +- name: "Whitelists | configure AllowUsers" when: sshd_allow_users is defined notify: "Restart ssh" ansible.builtin.lineinfile: @@ -8,7 +8,7 @@ line: "AllowUsers {{ sshd_allow_users }}" validate: /usr/sbin/sshd -t -f %s -- name: "Configure AllowGroups" +- name: "Whitelists | configure AllowGroups" when: sshd_allow_groups is defined notify: "Restart ssh" ansible.builtin.lineinfile: