29 lines
540 B
YAML
29 lines
540 B
YAML
---
|
|
- name: Create .ssh dir
|
|
become: true
|
|
become_user: git
|
|
ansible.builtin.file:
|
|
path: ~/.ssh
|
|
owner: git
|
|
group: git
|
|
mode: 0700
|
|
|
|
- name: Add SSH public key
|
|
become: true
|
|
become_user: git
|
|
ansible.builtin.copy:
|
|
content: "{{ git_ssh_keys.pub }}"
|
|
dest: ~/.ssh/id_rsa.pub
|
|
owner: git
|
|
group: git
|
|
mode: 0644
|
|
|
|
- name: Add SSH private key
|
|
become: true
|
|
become_user: git
|
|
ansible.builtin.copy:
|
|
content: "{{ git_ssh_keys.priv }}"
|
|
dest: ~/.ssh/id_rsa
|
|
owner: git
|
|
group: git
|
|
mode: 0600
|