Skip to content
Snippets Groups Projects
Commit f78dddb4 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

refactor: increase performance of XSD deployment by creating deduplicated...

refactor: increase performance of XSD deployment by creating deduplicated directories and using ansible.posix.synchronize to copy files
parent f8cd3dcf
No related branches found
No related tags found
No related merge requests found
Pipeline #2744 failed
--- ---
- name: prepare XSD directories - name: prepare XSD directories
ansible.builtin.file: ansible.builtin.file:
path: "/{{ item.dir }}" path: "/{{ item }}"
owner: "{{ vault_rosetta_user }}" owner: "{{ vault_rosetta_user }}"
group: "{{ vault_rosetta_group }}" group: "{{ vault_rosetta_group }}"
state: directory state: directory
mode: "0775" mode: "0775"
loop: "{{ local_jhove_xsds }}" loop: "{{ ( local_jhove_xsds | selectattr('dir', 'defined') | map(attribute='dir') | unique | list ) }}"
- name: install XSDs used in Rosetta format library XML metadata extractor plugin configuration - name: install XSDs used in Rosetta format library XML metadata extractor plugin configuration
ansible.builtin.copy: # 'ansible.builtin.copy' doesn't scale well for hundreds of files, so we use
src: "{{ item.dir }}{{ item.filename }}" # 'ansible.posix.synchronize' instead
dest: "/{{ item.dir }}{{ item.filename }}" # from "man 1 rsync":
owner: "{{ vault_rosetta_user }}" # Note that rsync always verifies that each transferred file was correctly
group: "{{ vault_rosetta_group }}" # reconstructed on the receiving side by checking a whole-file checksum that
mode: "0664" # is generated as the file is transferred, but that automatic
checksum: "{{ item.sha1 }}" # after-the-transfer verification has nothing to do with this option's
# before-the-transfer "Does this file need to be updated?" check.
ansible.posix.synchronize:
src: "{{ item.dir }}{{ item.filename}}"
dest: "/{{ item.dir }}{{ item.filename}}"
rsync_opts:
- "--chmod=F664"
- "--chown={{ vault_rosetta_user }}:{{ vault_rosetta_group }}"
loop: "{{ local_jhove_xsds }}" loop: "{{ local_jhove_xsds }}"
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment