zuul-jobs/roles/upload-afs-synchronize/tasks/main.yaml
Clark Boylan d49893f894 Partial address ansible-lint E208
- replaces ignore with a warn, which displays issue without affecting
  the linting outcome (allowing gradual fixing)
- bumps linter to enable the warn_list feature
- fixes a set of issues, others will be fixed in follow-up

Change-Id: I7d6f8c156b06f68f681943e88860930968e7c9f9
2020-09-29 10:29:01 +01:00

20 lines
583 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
mode: 0755
- 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 [] }}'