mirror of
https://github.com/roles-ansible/ansible_role_ntp.git
synced 2024-08-16 12:59:49 +02:00
drop legacy
This commit is contained in:
parent
e278db3848
commit
c6335cc479
1 changed files with 0 additions and 23 deletions
|
@ -7,15 +7,6 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: check legacy playbook version
|
|
||||||
become: true
|
|
||||||
slurp:
|
|
||||||
src: "/etc/ansible-version/{{ playbook_version_path }}"
|
|
||||||
register: legacy_playbook_version
|
|
||||||
when: submodules_versioncheck|bool
|
|
||||||
ignore_errors: yes
|
|
||||||
changed_when: False
|
|
||||||
|
|
||||||
- name: check playbook version
|
- name: check playbook version
|
||||||
become: true
|
become: true
|
||||||
slurp:
|
slurp:
|
||||||
|
@ -39,26 +30,12 @@
|
||||||
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
||||||
when:
|
when:
|
||||||
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
|
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
|
||||||
- legacy_playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
|
|
||||||
|
|
||||||
- name: delete legacy version if needed
|
|
||||||
become: true
|
|
||||||
file:
|
|
||||||
state: absent
|
|
||||||
path: "/etc/ansible-version/{{ playbook_version_path }}"
|
|
||||||
|
|
||||||
- name: check if '/etc/ansible-version/' is empty
|
- name: check if '/etc/ansible-version/' is empty
|
||||||
find:
|
find:
|
||||||
paths: '/etc/ansible-version/'
|
paths: '/etc/ansible-version/'
|
||||||
register: filesFound
|
register: filesFound
|
||||||
|
|
||||||
- name: delete legacy version folder if needed
|
|
||||||
become: true
|
|
||||||
file:
|
|
||||||
state: absent
|
|
||||||
path: "/etc/ansible-version"
|
|
||||||
when: filesFound.matched < 0
|
|
||||||
|
|
||||||
- name: write new version to remote disk
|
- name: write new version to remote disk
|
||||||
become: true
|
become: true
|
||||||
copy:
|
copy:
|
||||||
|
|
Loading…
Reference in a new issue