copy with encrypted files working now
This commit is contained in:
@@ -16,26 +16,14 @@
|
||||
- public_keys/yubikey.pub
|
||||
|
||||
- name: users | rene | install private ssh keys
|
||||
block:
|
||||
- name: users | rene | cat block into keyfile
|
||||
blockinfile:
|
||||
copy:
|
||||
dest: "/home/rene/.ssh/{{ item.dest }}"
|
||||
state: present
|
||||
create: true
|
||||
block: |
|
||||
{{ lookup('file',item.src) }}
|
||||
src: "{{ item.src }}"
|
||||
owner: rene
|
||||
group: rene
|
||||
mode: '0600'
|
||||
marker_begin: ""
|
||||
marker_end: ""
|
||||
- name: users | rene | remove ansible comments from keyfile
|
||||
lineinfile:
|
||||
path: "home/rene/.ssh/{{ item.dest }}"
|
||||
state: absent
|
||||
line: "# ANSIBLE MANAGED BLOCK" # not required. The line to insert/replace into the file. Required for C(state=present). If C(backrefs) is set, may contain backreferences that will get expanded with the C(regexp) capture groups if the regexp matches.
|
||||
loop:
|
||||
- {src: private_keys/gitlab_read_ed25519, dest: gitlab_read_ed25519}
|
||||
- { src: "private_keys/gitlab_read_ed25519", dest: "gitlab_read_ed25519" }
|
||||
# - private_keys/id_dsa
|
||||
# - private_keys/id_ed25519
|
||||
# - private_keys/id_rsa
|
||||
|
||||
Reference in New Issue
Block a user