adding key-options for hetzner too, unifying modification of authorized_keys with rsync and hetzner
This commit is contained in:
parent
0aa8575227
commit
1afb01aa4a
@ -46,7 +46,7 @@
|
|||||||
with_items: "{{ borgbackup_servers }}"
|
with_items: "{{ borgbackup_servers }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: client | modify local rsync.net authorized_keys
|
- name: client | modify local rsync.net/hetzner authorized_keys
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "{{ ansible_user_id }}"
|
user: "{{ ansible_user_id }}"
|
||||||
key: "{{ sshkey.stdout }}"
|
key: "{{ sshkey.stdout }}"
|
||||||
@ -55,19 +55,7 @@
|
|||||||
manage_dir: no
|
manage_dir: no
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
become: no
|
become: no
|
||||||
when: item.type == 'rsync.net'
|
when: item.type in ['rsync.net','hetzner']
|
||||||
with_items: "{{ borgbackup_servers }}"
|
|
||||||
register: authkeys
|
|
||||||
|
|
||||||
- name: client | modify local hetzner authorized_keys
|
|
||||||
authorized_key:
|
|
||||||
user: "{{ ansible_user_id }}"
|
|
||||||
key: "{{ sshkey.stdout }}"
|
|
||||||
path: "/tmp/authkeys-{{ item.type }}-{{ item.fqdn }}-authkeys"
|
|
||||||
manage_dir: no
|
|
||||||
delegate_to: localhost
|
|
||||||
become: no
|
|
||||||
when: item.type == 'hetzner'
|
|
||||||
with_items: "{{ borgbackup_servers }}"
|
with_items: "{{ borgbackup_servers }}"
|
||||||
register: authkeys
|
register: authkeys
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user