Feat: new system for publickeys

This commit is contained in:
Bertrand Benjamin 2020-07-16 17:37:34 +02:00
parent 1796e187bc
commit 3dde709e2c
4 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILA5ZkwTDD6UM6e/J2p0QtZz6h+9dVgjldRyUARe5h54 waha@Choux-2020-03-16

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+43qSvi4NJXHZRmtf5x31mK46aa0T7hr4q3SGIYMit lafrite@Choux-2020-07-16

View File

@ -16,3 +16,12 @@
with_items: "{{ users }}" with_items: "{{ users }}"
when: create_user when: create_user
- name: ssh -- Add public key
authorized_key:
user: "{{ item.user.username }}"
key: "{{ lookup('file', 'sshpubs/' + item.key) }}"
state: present
with_items: "{{ public_key }}"
register: add_identity_key
tags:
- first_deployement

View File

@ -1,3 +1,6 @@
--- ---
deploy_public_key: id_rsa_manioc.pub public_key:
- user: "{{ admin }}"
key: id_ed25519_choux2Panais_admin.pub
- user: "{{ content }}"
key: id_ed25519_choux2Panais_content.pub