f607fd9a24
This works around missing parent directories in AFS, since rsync will create the target directory but not its parent directories. In cases where the parent directory does not yet exist, it's nice to create it automatically first, if we can. Change-Id: Ia136ea3a416d6085d1f6e277b4c071573c5660e4
19 lines
568 B
YAML
19 lines
568 B
YAML
- name: Precreate AFS target directory
|
|
# rsync will create the target directory but not its parent directories
|
|
# which may not yet exist
|
|
file:
|
|
path: "{{ afs_target }}"
|
|
state: directory
|
|
- name: Upload contents to AFS
|
|
synchronize:
|
|
src: "{{ afs_source }}"
|
|
dest: "{{ afs_target }}"
|
|
# NOTE(ianw): you can't set group permissions on AFS, hence we
|
|
# don't set owner specifically.
|
|
archive: false
|
|
perms: true
|
|
times: true
|
|
recursive: true
|
|
rsync_opts: '{{ ["--safe-links"] + ["--delete-after"] if not afs_copy_only else [] }}'
|
|
|