disable to maintain authorized keys file

This commit is contained in:
Ruben Blanco 2024-02-12 11:23:17 +01:00
parent e4a3f48c81
commit 291d766fc6
1 changed files with 5 additions and 4 deletions

View File

@ -18,11 +18,12 @@
name: root name: root
password: "{{ ssh_password | password_hash('sha512') }}" password: "{{ ssh_password | password_hash('sha512') }}"
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# DISABLE to MAINTAIN AUTHORIZED KEYS FILE
# delete root ssh pub key in Authorized_keys # delete root ssh pub key in Authorized_keys
- name: delete ssh pub key in /root/.ssh/authorized_keys #- name: delete ssh pub key in /root/.ssh/authorized_keys
file: # file:
path: "{{ root_authorized_keys }}" # path: "{{ root_authorized_keys }}"
state: absent # state: absent
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# config sshd_config file , no root password # config sshd_config file , no root password
#- name: change sshd_config to no root password #- name: change sshd_config to no root password