1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_weechat.git synced 2024-08-16 13:09:48 +02:00

kick out legacy part of versionscheck

This commit is contained in:
L3D 2020-03-09 17:51:33 +01:00 committed by L3D
parent 9ec0452579
commit d8e1c4b276
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
4 changed files with 5 additions and 29 deletions

1
.github/FUNDING.yml vendored
View file

@ -2,4 +2,3 @@
github: [do1jlr] github: [do1jlr]
liberapay: L3D liberapay: L3D
custom: ['https://paypal.me/c3woc']

View file

@ -14,5 +14,5 @@ weechat_directory: "/home/{{ weechat_user }}/.weechat"
# plugins we want # plugins we want
weechat_plugins: [] weechat_plugins: []
# version check for this role? # version check for this role? (true is recomended)
submodules_versioncheck: true submodules_versioncheck: false

View file

@ -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:

View file

@ -9,5 +9,5 @@ weechat_plugin_languages:
lua: lua lua: lua
# version management # version management
playbook_version_number: 1028 # should be over ninethousand playbook_version_number: 2048 # should be over ninethousand
playbook_version_path: 'role-weechat_chaos-bodensee_github.com.version' playbook_version_path: 'role-weechat_roles-ansible_github.com.version'