diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml index 9cfdbba..9895582 100644 --- a/tasks/versioncheck.yml +++ b/tasks/versioncheck.yml @@ -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: diff --git a/vars/main.yml b/vars/main.yml index 19652fc..92105f1 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -8,5 +8,5 @@ bash: shell: "/bin/bash" keyboard: '$(if [[ $(id -u) -ne 0 ]];then echo "\[\033[01;33m\]"; else echo "\[\033[01;31m\]"; fi) $(if [[ $? == 0 ]]; then printf "\xE2\x9D\xA4"; fi) \[\033[01;32m\]\u\[\033[01;36m\]@\[\033[01;32m\]\H\[\033[01;34m\] <\A> \[\033[01;35m\] \j \[\033[01;36m\] \w \[\033[01;33m\]\n\[\033[01;33m\] $(git branch 2>/dev/null | sed -n "s/* \(.*\)/\1 /p")$\[\033[01;00m\] ' -playbook_version_number: 2052 # should be over ninethousand +playbook_version_number: 2053 # should be over ninethousand playbook_version_path: 'role_dotfiles_chaos-bodensee_github.version'