ansible/roles/openssh/tasks/main.yml

17 lines
366 B
YAML

---
- name: Filter SSH on groups
lineinfile:
dest: /etc/ssh/sshd_config
regexp: ^#?PermitRootLogin
line: PermitRootLogin yes
state: present
notify: Restart sshd service
- name: Delete authorized SSH keys for root account
file:
path: "{{ item }}"
state: absent
loop:
- /root/.ssh/authorized_keys
- /root/.ssh/authorized_keys2