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:
parent
1c25806494
commit
e794c0e7e5
1 changed files with 7 additions and 7 deletions
|
@ -5,33 +5,33 @@
|
||||||
path: '/etc/ansible-version'
|
path: '/etc/ansible-version'
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: submodules_versioncheck
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: check playbook version
|
- name: check playbook version
|
||||||
become: true
|
become: true
|
||||||
slurp:
|
slurp:
|
||||||
src: "{{ playbook_version_path }}"
|
src: "{{ playbook_version_path }}"
|
||||||
register: playbook_version
|
register: playbook_version
|
||||||
when: submodules_versioncheck
|
when: submodules_versioncheck|bool
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Print version
|
- name: Print version
|
||||||
debug:
|
debug:
|
||||||
msg: "Remote playbook version: '{{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}'. Local playbook version: '{{ playbook_version_number|string }}'."
|
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
|
- name: Check if your version is outdated
|
||||||
fail:
|
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 }}'!"
|
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:
|
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
|
- name: write new version to remote disk
|
||||||
become: true
|
become: true
|
||||||
copy:
|
copy:
|
||||||
content: "{{ playbook_version_number }}"
|
content: "{{ playbook_version_number }}"
|
||||||
dest: "{{ playbook_version_path }}"
|
dest: "{{ playbook_version_path }}"
|
||||||
when: submodules_versioncheck
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: install the latest libselinux-python package
|
- name: install the latest libselinux-python package
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
state: latest
|
state: latest
|
||||||
when:
|
when:
|
||||||
- ansible_os_family != 'RedHat'
|
- ansible_os_family != 'RedHat'
|
||||||
- install_keychain
|
- install_keychain|bool
|
||||||
|
|
||||||
- name: install keychain on centos
|
- name: install keychain on centos
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'RedHat'
|
- ansible_os_family == 'RedHat'
|
||||||
- install_keychain
|
- install_keychain|bool
|
||||||
|
|
||||||
- name: Create a global bashrc configuration
|
- name: Create a global bashrc configuration
|
||||||
become: yes
|
become: yes
|
||||||
|
|
Loading…
Reference in a new issue