Use lineinfile
This commit is contained in:
parent
795a1afb6e
commit
75663a7025
@ -64,12 +64,13 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Set authorized keys for git user
|
- name: Set authorized keys for git user
|
||||||
authorized_key:
|
lineinfile:
|
||||||
user: git
|
|
||||||
state: present
|
|
||||||
key: "{{ lookup('file', '/home/git/.ssh/id_rsa.pub') }}"
|
|
||||||
path: /var/lib/gitea/git/.ssh/authorized_keys
|
path: /var/lib/gitea/git/.ssh/authorized_keys
|
||||||
manage_dir: false
|
line: "{{ lookup('file', '/home/git/.ssh/id_rsa.pub') }}"
|
||||||
|
owner: git
|
||||||
|
group: git
|
||||||
|
state: present
|
||||||
|
with_file:
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Symlink the authorized keys configuration
|
- name: Symlink the authorized keys configuration
|
||||||
|
Reference in New Issue
Block a user