Deploy SSH keys.

This commit is contained in:
yohan 2024-06-18 11:14:34 +02:00
parent 7af5d065a3
commit e63fc2bc1b
2 changed files with 13 additions and 0 deletions

View File

@ -203,6 +203,18 @@
set_fact:
ansible_user: "{{ LINUX_USERNAME }}"
- name: Deploy SSH private key
copy:
src: "{{ PRIVATE_KEY_FILE }}"
dest: "/home/{{ LINUX_USERNAME }}/.ssh/"
mode: 0600
- name: Deploy SSH public key
copy:
src: "{{ PUBLIC_KEY_FILE }}"
dest: "/home/{{ LINUX_USERNAME }}/.ssh/"
mode: 0640
- name: Configure VIM
ansible.builtin.lineinfile:
path: /etc/vimrc

View File

@ -9,6 +9,7 @@ SWIFT_REGIONNAME: "GRA"
LINUX_USERNAME: "yohan"
PRIVATE_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa"
PUBLIC_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa.pub"
DUPLICITY_WORKDIR: /mnt/volumes/tmp_duplicity_workdir/data