Restore task naming consistency
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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' }
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user