new version
Some checks failed
Some checks failed
This commit is contained in:
@@ -1,17 +1,8 @@
|
||||
---
|
||||
- name: Create .ssh directory for ansible user
|
||||
ansible.builtin.file:
|
||||
path: /home/ansible/.ssh
|
||||
state: directory
|
||||
owner: ansible
|
||||
group: ansible
|
||||
mode: '0700'
|
||||
|
||||
- name: Add SSH keys for administrators
|
||||
- name: Ajout des clés SSH pour les administrateurs
|
||||
ansible.posix.authorized_key:
|
||||
user: ansible
|
||||
user: "{{ item.user }}"
|
||||
state: present
|
||||
key: "{{ item.key }}"
|
||||
comment: "{{ item.name }}"
|
||||
loop: "{{ admin_ssh_keys | default([]) }}"
|
||||
when: admin_ssh_keys is defined
|
||||
comment: "{{ item.comment | default('Admin key') }}"
|
||||
with_items: "{{ admin_ssh_keys | default([]) }}"
|
Reference in New Issue
Block a user