Bertrand Lanson
974344d9c4
All checks were successful
test / Linting (push) Successful in 15s
test / Molecule tests (default, debian11) (push) Successful in 26s
test / Molecule tests (default, debian12) (push) Successful in 28s
test / Molecule tests (default, ubuntu2004) (push) Successful in 27s
test / Molecule tests (default, ubuntu2204) (push) Successful in 28s
test / Molecule tests (with_ssh_keys, debian11) (push) Successful in 30s
test / Molecule tests (with_ssh_keys, debian12) (push) Successful in 30s
test / Molecule tests (with_ssh_keys, ubuntu2004) (push) Successful in 30s
test / Molecule tests (with_ssh_keys, ubuntu2204) (push) Successful in 30s
24 lines
663 B
YAML
24 lines
663 B
YAML
---
|
|
# task/configure_host file for provision_management_user
|
|
- name: "Lock root password authentication"
|
|
ansible.builtin.lineinfile:
|
|
dest: /etc/ssh/sshd_config
|
|
regexp: '^PasswordAuthentication'
|
|
line: "PasswordAuthentication no"
|
|
state: present
|
|
backup: yes
|
|
notify:
|
|
- systemctl-restart-sshd
|
|
when: provision_management_user_disable_root_password_auth
|
|
|
|
- name: "Lock root authentication"
|
|
ansible.builtin.lineinfile:
|
|
dest: /etc/ssh/sshd_config
|
|
regexp: '^PermitRootLogin'
|
|
line: "PermitRootLogin no"
|
|
state: present
|
|
backup: yes
|
|
notify:
|
|
- systemctl-restart-sshd
|
|
when: provision_management_user_disable_root_login
|