Fix variabilization.

This commit is contained in:
yohan 2024-10-22 23:30:28 +02:00
parent da9c24f1fc
commit 60c17860ec
2 changed files with 5 additions and 9 deletions

View File

@ -4,13 +4,6 @@
- vars/main.yml
gather_facts: false
tasks:
- name: Gather facts
ansible.builtin.setup:
- name: Set ansible_user
set_fact:
ansible_user: "{{ ansible_user_id }}"
- name: Retrieve secrets
ansible.builtin.include_tasks:
file: "tasks/retrieve_secret_vars.yml"

View File

@ -1,4 +1,7 @@
---
- name: Gather facts
ansible.builtin.setup:
- name: get local machine-id
command: cat /etc/machine-id
register: get_local_machine_id_output
@ -21,11 +24,11 @@
- name: set remote workdir path
ansible.builtin.set_fact:
remote_workdir: /home/{{ ansible_user }}/.tmp_deploy_ovh
remote_workdir: "{{ ansible_user_dir }}/.tmp_deploy_ovh"
- name: set local workdir path
ansible.builtin.set_fact:
local_workdir: /home/{{ lookup('env', 'USER') }}/.tmp_deploy_ovh
local_workdir: "{{ lookup('env', 'HOME') }}/.tmp_deploy_ovh"
- name: create remote workdir
ansible.builtin.file: