ansible-desktop/roles/ubuntu/tasks/rearrange-folders-loop.yml

9 lines
362 B
YAML
Raw Normal View History

- name: "Lookup for {{ item }} directory"
stat:
path: "{{ desktop.old_source_dir }}/{{ item }}"
register: old_directory
- name: "Move {{ desktop.old_source_dir }}/{{ item }} to {{ desktop.apps_source_dir }}/{{ item }}"
command: mv {{ desktop.old_source_dir }}/{{ item }} {{ desktop.apps_source_dir }}/{{ item }}
when:
- old_directory.stat.exists