mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-12-14 10:04:52 +01:00
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
- name: SSH keys deploy
|
||||
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
|
||||
block:
|
||||
- name: Create dir
|
||||
ansible.builtin.file:
|
||||
path: /home/jd/.ssh
|
||||
owner: jd
|
||||
group: jd
|
||||
mode: '0700'
|
||||
state: directory
|
||||
- name: Upload key
|
||||
ansible.builtin.copy:
|
||||
src: id_rsa
|
||||
@@ -11,7 +18,7 @@
|
||||
when: inventory_hostname != 'nas.home.lan'
|
||||
- name: Upload key
|
||||
ansible.builtin.copy:
|
||||
src: id_rsa
|
||||
src: id_rsa.pub
|
||||
dest: /home/jd/.ssh/id_rsa.pub
|
||||
mode: '0600'
|
||||
owner: jd
|
||||
|
||||
Reference in New Issue
Block a user