- { src: "{{ var_containing_package1 }}" }
On 2/14/24 9:00 AM, Dimitri Yioulos wrote:
I have plays in a playbook to copy files to a remote host, then delete
them at the end of the task list. This is the copy play:
* - name: Copy files to host
copy:
src: "{{ item.src }}"
dest: /tmp
mode: u=rwx,g=rw,o=rw
with_items:
- { src: package1 }
- { src: file1 }
- { src: file2 }
tags: copy_files*
package1 is changeable, from time-to-time. I'd like to add the name as
a variable, then call the variable in both the copy and delete plays,
so that I only have to change the package name once. How can I
accomplish that? All of my attempts have failed.
--
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/52e9d6e8-cbb1-4a5d-9b96-87360303b12bn%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/52e9d6e8-cbb1-4a5d-9b96-87360303b12bn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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/af531113-6c8f-4386-b4d0-b6c33ec73b4b%40gmail.com.