Added some examples of accessing nested variables

This commit is contained in:
Vlad R
2023-08-14 07:51:55 +00:00
parent 128fb50e36
commit 5d8d76fa5c
3 changed files with 97 additions and 5 deletions
+5 -5
View File
@@ -9,11 +9,11 @@
ansible.builtin.shell: "cd /var/log; find . -maxdepth 1 -type f | cut -d'/' -f2"
register: files_to_copy
- name: Copy the log files
ansible.builtin.fetch:
src: /var/log/{{ item }}
dest: /home/vlad/Desktop/ansible/dnaclab_linux/logs/
with_items: "{{ files_to_copy.stdout_lines }}"
# - name: Copy the log files
# ansible.builtin.fetch:
# src: /var/log/{{ item }}
# dest: /home/vlad/Desktop/ansible/dnaclab_linux/logs/
# with_items: "{{ files_to_copy.stdout_lines }}"