15d783de86
* template --> ansible.builtin.template * apt --> ansible.builtin.apt * lineinfile --> ansible.builtin.lineinfile * file --> ansible.builtin.file * blockinfile --> ansible.builtin.blockinfile * cron --> ansible.builtin.cron * timezone --> ansible.builtin.timezone * get_url --> ansible.builtin.get_url * group --> ansible.builtin.group * user --> ansible.builtin.user * unarchive --> ansible.builtin.unarchive * service --> ansible.builtin.service * apache2_module --> ansible.builtin.apache2_module * package --> ansible.builtin.apt * template --> ansible.builtin.template 2
10 lines
279 B
YAML
10 lines
279 B
YAML
---
|
|
- name: prohibit ssh login with password
|
|
become: yes
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: '#PasswordAuthentication yes'
|
|
line: 'PasswordAuthentication no'
|
|
state: present
|
|
# backrefs: yes
|
|
notify: restart_sshd
|