1
0
Fork 0
mirror of https://github.com/DO1JLR/ansible_linux_desktop_setup.git synced 2024-09-14 19:54:51 +02:00

update modules

This commit is contained in:
L3D 2020-09-18 17:17:43 +02:00
parent 474ba8d57f
commit 1351f5cb57
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
9 changed files with 17 additions and 51 deletions

@ -1 +1 @@
Subproject commit f4880a5c290eeb7e78d0d5f72bf253faeac51814 Subproject commit a1e2982b3d26bdf6849e5fb8aaccd92c78338a6b

@ -1 +1 @@
Subproject commit 6c8446fd35edbf1411c75ee81945f8299f382b87 Subproject commit 2442657b9655cf50778dbb5873812c9beeaabe7f

@ -1 +1 @@
Subproject commit b558c359fb9fb95593bb304f0d5b62787a39511f Subproject commit ee9709d0fcd563e54dd928655f5d0f0c285d5b31

View file

@ -2,7 +2,7 @@
- name: Create directory for versionscheck - name: Create directory for versionscheck
become: true become: true
file: file:
path: '/etc/ansible-version' path: '/etc/.ansible-version'
state: directory state: directory
mode: 0755 mode: 0755
when: submodules_versioncheck|bool when: submodules_versioncheck|bool
@ -10,7 +10,7 @@
- name: check playbook version - name: check playbook version
become: true become: true
slurp: slurp:
src: "{{ playbook_version_path }}" src: "/etc/.ansible-version/{{ playbook_version_path }}"
register: playbook_version register: playbook_version
when: submodules_versioncheck|bool when: submodules_versioncheck|bool
ignore_errors: yes ignore_errors: yes
@ -32,9 +32,15 @@
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
- name: check if '/etc/ansible-version/' is empty
find:
paths: '/etc/ansible-version/'
register: filesFound
- 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: "/etc/.ansible-version/{{ playbook_version_path }}"
mode: 0644
when: submodules_versioncheck|bool when: submodules_versioncheck|bool

View file

@ -1,3 +1,3 @@
--- ---
playbook_version_number: 9000 # should be over ninethousand playbook_version_number: 9001 # should be over ninethousand
playbook_version_path: '/etc/ansible-version/role-networkmanager_chaos-bodensee_github.com.version' playbook_version_path: 'role-networkmanager_roles-ansible_github.com.version'

@ -1 +1 @@
Subproject commit 18baf04895219e7711ff747cff662902b7ef0f58 Subproject commit 2bc3e2f5f613b4bad21f6bd098516a8101f52f13

@ -1 +1 @@
Subproject commit c6335cc479d8b5b1664c37e6ed521d608b89eedb Subproject commit fcd83491f8fdb4f6f0c48f7f5163db10a8937be5

@ -1 +1 @@
Subproject commit cabbed7f903e76bdca0dba25888b860558dacab5 Subproject commit 048b4c9cacc9adf53b4fcd730be86b0d1d37956d

View file

@ -1,40 +0,0 @@
---
- name: Create directory for versionscheck
become: true
file:
path: '/etc/ansible-version'
state: directory
mode: 0755
when: submodules_versioncheck|bool
- name: check playbook version
become: true
slurp:
src: "{{ playbook_version_path }}"
register: playbook_version
when: submodules_versioncheck|bool
ignore_errors: yes
failed_when: false
- name: Print remote role version
debug:
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
when: submodules_versioncheck|bool
- name: Print locale role version
debug:
msg: "Local role version: '{{ playbook_version_number|string }}'."
when: submodules_versioncheck|bool
- name: Check if your version is outdated
fail:
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
- name: write new version to remote disk
become: true
copy:
content: "{{ playbook_version_number }}"
dest: "{{ playbook_version_path }}"
when: submodules_versioncheck|bool