Fix variabilization.

This commit is contained in:
yohan 2024-10-22 23:37:42 +02:00
parent 60c17860ec
commit f905d1a378
4 changed files with 6 additions and 4 deletions

View File

@ -111,7 +111,7 @@
- name: set remote workdir path - name: set remote workdir path
ansible.builtin.set_fact: ansible.builtin.set_fact:
remote_workdir: "/home/{{ ansible_user }}/.tmp_deploy_ovh" remote_workdir: "/home/{{ ansible_user }}/{{ ANSIBLE_WORKDIR }}"
tags: tags:
- common - common
- always - always

View File

@ -10,7 +10,7 @@
- name: Deploy SSH private key - name: Deploy SSH private key
copy: copy:
src: "{{ PRIVATE_KEY_FILE }}" src: "{{ ansible_user_dir }}/{{ ANSIBLE_WORKDIR }}/id_rsa"
dest: "{{ ansible_user_dir }}/.ssh/" dest: "{{ ansible_user_dir }}/.ssh/"
mode: 0600 mode: 0600

View File

@ -24,11 +24,11 @@
- name: set remote workdir path - name: set remote workdir path
ansible.builtin.set_fact: ansible.builtin.set_fact:
remote_workdir: "{{ ansible_user_dir }}/.tmp_deploy_ovh" remote_workdir: "{{ ansible_user_dir }}/{{ ANSIBLE_WORKDIR }}"
- name: set local workdir path - name: set local workdir path
ansible.builtin.set_fact: ansible.builtin.set_fact:
local_workdir: "{{ lookup('env', 'HOME') }}/.tmp_deploy_ovh" local_workdir: "{{ lookup('env', 'HOME') }}/{{ ANSIBLE_WORKDIR }}"
- name: create remote workdir - name: create remote workdir
ansible.builtin.file: ansible.builtin.file:

View File

@ -13,6 +13,8 @@ LINUX_USERNAME: "yohan"
PRIVATE_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa" PRIVATE_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa"
PUBLIC_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa.pub" PUBLIC_KEY_FILE: "/home/{{ LINUX_USERNAME }}/.ssh/id_rsa.pub"
ANSIBLE_WORKDIR: ".tmp_deploy_ovh"
DUPLICITY_WORKDIR: /mnt/volumes/tmp_duplicity_workdir/data DUPLICITY_WORKDIR: /mnt/volumes/tmp_duplicity_workdir/data
DUPLICITY_ARCHIVE_DIR: /mnt/volumes/duplicity_cache/data DUPLICITY_ARCHIVE_DIR: /mnt/volumes/duplicity_cache/data