|
13 | 13 | - name: Check playbook version
|
14 | 14 | become: true
|
15 | 15 | ansible.builtin.slurp:
|
16 |
| - src: "/etc/.ansible-version/{{ ntp__playbook_version_path }}" |
17 |
| - register: ntp__playbook_version |
| 16 | + src: "/etc/.ansible-version/{{ playbook_version_path }}" |
| 17 | + register: playbook_version |
18 | 18 | when: submodules_versioncheck | bool
|
19 |
| - ignore_errors: true |
20 | 19 | failed_when: false
|
21 | 20 |
|
22 |
| -- name: Print remote role version |
| 21 | +- name: Print remote role version # noqa: H500 |
23 | 22 | ansible.builtin.debug:
|
24 |
| - msg: "Remote role version: {{ ntp__playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}" |
| 23 | + msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}" |
25 | 24 | when: submodules_versioncheck | bool
|
26 | 25 |
|
27 |
| -- name: Print locale role version |
| 26 | +- name: Print locale role version # noqa: H500 |
28 | 27 | ansible.builtin.debug:
|
29 | 28 | msg: "Local role version: '{{ playbook_version_number | string }}'."
|
30 | 29 | when: submodules_versioncheck | bool
|
|
33 | 32 | ansible.builtin.fail:
|
34 | 33 | msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
35 | 34 | when:
|
36 |
| - - ntp__playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool |
| 35 | + - playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool |
37 | 36 |
|
38 | 37 | - name: Write new version to remote disk
|
39 | 38 | become: true
|
40 | 39 | ansible.builtin.copy:
|
41 | 40 | content: "{{ playbook_version_number }}"
|
42 |
| - dest: "/etc/.ansible-version/{{ ntp__playbook_version_path }}" |
| 41 | + dest: "/etc/.ansible-version/{{ playbook_version_path }}" |
43 | 42 | mode: '0644'
|
44 | 43 | when: submodules_versioncheck | bool
|
45 | 44 | tags: skip_ansible_lint_template-instead-of-copy
|
0 commit comments