Allow syncing an arbitrary set of files to the target
This commit is contained in:
parent
a3c514d18d
commit
d26fbf2577
2 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
docker_compose__build: always
|
||||
docker_compose__configuration_files: [ ]
|
||||
docker_compose__pull: always
|
||||
# location of directory to sync to target
|
||||
docker_compose__files: ""
|
||||
|
|
|
|||
|
|
@ -72,6 +72,14 @@
|
|||
loop: "{{ docker_compose__configuration_files }}"
|
||||
notify: docker compose restart
|
||||
|
||||
- name: Sync files
|
||||
ansible.posix.synchronize:
|
||||
src: "{{ docker_compose__files }}/"
|
||||
dest: "/ansible_docker_compose/files"
|
||||
delete: true
|
||||
become: true
|
||||
when: docker_compose__files != ""
|
||||
|
||||
- name: Flush handlers to make "docker compose down" and "docker compose restart" handlers run now
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue