same private keys for all users is not a good idea

This commit is contained in:
2022-02-20 17:57:32 +01:00
parent 1bbc5f778e
commit d3f75ead02
3 changed files with 33 additions and 39 deletions

View File

@@ -3,17 +3,17 @@
name: root
password_lock: yes
- name: users | root | install public ssh keys
authorized_key:
user: root
state: present
key: '{{ item }}'
with_file:
- public_keys/id_dsa.pub
- public_keys/id_ed25519.pub
- public_keys/rene_id_rsa.pub
- public_keys/root_id_rsa.pub
- public_keys/yubikey.pub
# - name: users | root | install public ssh keys
# authorized_key:
# user: root
# state: present
# key: '{{ item }}'
# with_file:
# - public_keys/id_dsa.pub
# - public_keys/id_ed25519.pub
# - public_keys/rene_id_rsa.pub
# - public_keys/root_id_rsa.pub
# - public_keys/yubikey.pub
- name: users | root | install public key for backups
authorized_key:
@@ -24,15 +24,15 @@
with_file:
- public_keys/backup_ed25519.pub
- name: users | root | install private ssh keys
copy:
dest: "/root/.ssh/"
src: "{{ item }}"
owner: root
group: root
mode: '0600'
loop:
- "private_keys/gitlab_read_ed25519"
# - name: users | root | install private ssh keys
# copy:
# dest: "/root/.ssh/"
# src: "{{ item }}"
# owner: root
# group: root
# mode: '0600'
# loop:
# - "private_keys/gitlab_read_ed25519"
# - name: users | root | install known_hosts
# copy: