If you are using a variable like "my_temp_dir", then you can overwrite it
before each task using something like:
- set_fact:
my_temp_dir: "new_value"
as a separated task.
However, if the variable is provided at runtime as an extra var, some
additional considerations should be done regarding value precedence.
El martes, 18 de enero de 2022 a la(s) 11:30:14 UTC-3,
[email protected] escribió:
> I am running some tasks with delegate_to. When those tasks run, they use
> the same remote_tmp directory setup from the *ansible.cfg*. However, due
> to permissions and directory size issues, I need to change the remote_tmp
> directory for tasks that I am using delegate_to for.
>
> Example:
> - name: Create Temp Dir
> delegate_to: localhost
> file:
> path: "{{ my_temp_dir }}"
> state: directory
>
> I am using Ansible 2.3.2.
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4c5c6654-e726-43cb-90a2-35ff1edbd2d4n%40googlegroups.com.