mirror of
https://github.com/roles-ansible/ansible_role_packages.git
synced 2024-08-16 10:19:51 +02:00
CHANGING | drop legacy support
This commit is contained in:
parent
9e891b6b9e
commit
88b3788e39
2 changed files with 2 additions and 25 deletions
|
@ -7,15 +7,6 @@
|
|||
mode: 0755
|
||||
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
|
||||
become: true
|
||||
slurp:
|
||||
|
@ -39,26 +30,12 @@
|
|||
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
||||
when:
|
||||
- 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
|
||||
find:
|
||||
paths: '/etc/ansible-version/'
|
||||
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
|
||||
become: true
|
||||
copy:
|
||||
|
|
|
@ -58,5 +58,5 @@ fedora_packages:
|
|||
- python3-pip
|
||||
- python3
|
||||
|
||||
playbook_version_number: 8980 # should be over ninethousand
|
||||
playbook_version_path: 'base-packages_ffbsee_or_chaos-bodensee_github.version'
|
||||
playbook_version_number: 8981 # should be over ninethousand
|
||||
playbook_version_path: 'base-packages_roles-ansible_github.version'
|
||||
|
|
Loading…
Reference in a new issue