|
2 | 2 | ---
|
3 | 3 |
|
4 | 4 | - name: "Include the vars file for {{ cvmfs_repo }}"
|
5 |
| - include_vars: "{{ cvmfs_repo }}.yml" |
| 5 | + ansible.builtin.include_vars: "{{ cvmfs_repo }}.yml" |
6 | 6 |
|
7 | 7 | - name: Start transaction
|
8 |
| - command: "cvmfs_server transaction {{ cvmfs_repo }}" |
| 8 | + ansible.builtin.command: "cvmfs_server transaction {{ cvmfs_repo }}" |
9 | 9 | when: cvmfs_start_transaction
|
10 | 10 |
|
11 |
| -- block: |
12 |
| - |
| 11 | +- name: Apply changes to CVMFS repository, if there are any |
| 12 | + block: |
13 | 13 | - name: "Create symlinks"
|
14 |
| - file: |
| 14 | + ansible.builtin.file: |
15 | 15 | path: "/cvmfs/{{ cvmfs_repo }}/{{ item }}"
|
16 | 16 | src: "{{ symlinks[item] }}"
|
17 | 17 | state: link
|
18 |
| - force: yes |
| 18 | + force: true |
19 | 19 | with_items: "{{ symlinks }}"
|
20 | 20 | register: create_symlinks
|
21 | 21 |
|
22 | 22 | - name: "Copy files"
|
23 |
| - copy: |
| 23 | + ansible.builtin.copy: |
24 | 24 | src: "{{ item.name }}"
|
25 | 25 | dest: "/cvmfs/{{ cvmfs_repo }}/{{ item.dest }}"
|
26 | 26 | mode: "{{ item.mode }}"
|
27 | 27 | with_items: "{{ files }}"
|
28 | 28 | register: create_files
|
29 | 29 |
|
30 | 30 | - name: Publish transaction
|
31 |
| - command: "cvmfs_server publish {{ cvmfs_repo }}" |
| 31 | + ansible.builtin.command: "cvmfs_server publish {{ cvmfs_repo }}" |
32 | 32 | when:
|
33 | 33 | - cvmfs_start_transaction
|
34 | 34 | - cvmfs_publish_transaction
|
35 | 35 | - create_symlinks.changed or create_files.changed
|
36 | 36 | register: publish
|
37 | 37 |
|
38 | 38 | - name: Abort transaction
|
39 |
| - command: "cvmfs_server abort {{ cvmfs_repo }}" |
| 39 | + ansible.builtin.command: "cvmfs_server abort {{ cvmfs_repo }}" |
40 | 40 | when: publish is skipped
|
41 | 41 |
|
42 | 42 | rescue:
|
43 | 43 | - name: Abort transaction
|
44 |
| - command: "cvmfs_server abort {{ cvmfs_repo }}" |
| 44 | + ansible.builtin.command: "cvmfs_server abort {{ cvmfs_repo }}" |
45 | 45 | when: cvmfs_start_transaction and cvmfs_abort_transaction_on_failures
|
46 | 46 |
|
47 | 47 | - name: Exit because of failure
|
48 |
| - fail: |
| 48 | + ansible.builtin.fail: |
49 | 49 | msg: "Task {{ ansible_failed_task }} failed, with result {{ ansible_failed_result }}."
|
0 commit comments