1
0
Fork 0
ynh-lydra-ansible-yunohost/tasks/admin_users.yml
2021-05-01 22:54:57 +02:00

14 lines
408 B
YAML

---
- name: add sshkey for admin user
ansible.posix.authorized_key:
user: "{{ item.name }}"
state: present
key: "{{ item.key }}"
loop: "{{ yunohost.admin_users }}"
- name: Disable Password Authentication for ssh.usage
ansible.builtin.replace:
path: /etc/ssh/sshd_config
regexp: PasswordAuthentication
replace: 'PasswordAuthentication no\1'
when: yunohost.nopassword == true