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

Update for lint fixes and deprecation

This commit is contained in:
Lilian Roller 2019-05-17 15:10:50 +02:00
parent 1c25806494
commit e794c0e7e5
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B

View file

@ -5,33 +5,33 @@
path: '/etc/ansible-version'
state: directory
mode: 0755
when: submodules_versioncheck
when: submodules_versioncheck|bool
- name: check playbook version
become: true
slurp:
src: "{{ playbook_version_path }}"
register: playbook_version
when: submodules_versioncheck
when: submodules_versioncheck|bool
ignore_errors: yes
- name: Print version
debug:
msg: "Remote playbook version: '{{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}'. Local playbook version: '{{ playbook_version_number|string }}'."
when: submodules_versioncheck
when: submodules_versioncheck|bool
- name: Check if your version is outdated
fail:
msg: "Your current ansible module has the version '{{ playbook_version_number }}' and is outdated. Please update it at least to version '{{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode }}'!"
when:
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
- name: write new version to remote disk
become: true
copy:
content: "{{ playbook_version_number }}"
dest: "{{ playbook_version_path }}"
when: submodules_versioncheck
when: submodules_versioncheck|bool
- name: install the latest libselinux-python package
become: yes
@ -48,7 +48,7 @@
state: latest
when:
- ansible_os_family != 'RedHat'
- install_keychain
- install_keychain|bool
- name: install keychain on centos
become: yes
@ -59,7 +59,7 @@
state: present
when:
- ansible_os_family == 'RedHat'
- install_keychain
- install_keychain|bool
- name: Create a global bashrc configuration
become: yes