mirror of
https://github.com/roles-ansible/ansible_role_packages.git
synced 2024-08-16 10:19:51 +02:00
Improve linting
This commit is contained in:
parent
d80ba95f4c
commit
3635fbf72c
5 changed files with 20 additions and 20 deletions
|
@ -26,7 +26,7 @@ By default it will also add the [ETH Zürich Debian Packages Mirror](https://deb
|
|||
| ``packages__ethz_security`` | ``true`` | Inofficial Debian Security Mirror |
|
||||
| ``packages__ethz_updates`` | ``true`` | Updates Mirror |
|
||||
| ``packages__ethz__backports`` | ``true`` | Backports Mirror |
|
||||
| ``submodules_versioncheck`` | ``false`` | Enable simple versioncheck to prevent running old versions of this role |
|
||||
| ``packages__submodules_versioncheck`` | ``false`` | Enable simple versioncheck to prevent running old versions of this role |
|
||||
|
||||
Contributing
|
||||
-------------
|
||||
|
|
|
@ -20,4 +20,4 @@ packages__install_cli: false
|
|||
packages__install_extra_packages: []
|
||||
|
||||
# Optional perform simple Versionscheck
|
||||
submodules_versioncheck: false
|
||||
packages__submodules_versioncheck: false
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: Run simple versionscheck (optional)
|
||||
ansible.builtin.include_tasks:
|
||||
file: 'versioncheck.yml'
|
||||
when: submodules_versioncheck | bool
|
||||
when: packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Adding additional apt sources (optional)
|
||||
ansible.builtin.include_tasks:
|
||||
|
|
|
@ -8,37 +8,37 @@
|
|||
path: '/etc/.ansible-version'
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: submodules_versioncheck | bool
|
||||
when: packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Check playbook version
|
||||
become: true
|
||||
ansible.builtin.slurp:
|
||||
src: "/etc/.ansible-version/{{ playbook_version_path }}"
|
||||
src: "/etc/.ansible-version/{{ packages__playbook_version_path }}"
|
||||
register: playbook_version
|
||||
when: submodules_versioncheck | bool
|
||||
when: packages__submodules_versioncheck | bool
|
||||
failed_when: false
|
||||
|
||||
- name: Print remote role version # noqa: H500
|
||||
ansible.builtin.debug:
|
||||
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
|
||||
when: submodules_versioncheck | bool
|
||||
when: packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Print locale role version # noqa: H500
|
||||
ansible.builtin.debug:
|
||||
msg: "Local role version: '{{ playbook_version_number | string }}'."
|
||||
when: submodules_versioncheck | bool
|
||||
msg: "Local role version: '{{ packages__playbook_version_number | string }}'."
|
||||
when: packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Check if your version is outdated
|
||||
ansible.builtin.fail:
|
||||
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 '{{ packages__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
|
||||
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= packages__playbook_version_number|int and packages__submodules_versioncheck | bool
|
||||
|
||||
- name: Write new version to remote disk
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
content: "{{ playbook_version_number }}"
|
||||
dest: "/etc/.ansible-version/{{ playbook_version_path }}"
|
||||
content: "{{ packages__playbook_version_number }}"
|
||||
dest: "/etc/.ansible-version/{{ packages__playbook_version_path }}"
|
||||
mode: '0644'
|
||||
when: submodules_versioncheck | bool
|
||||
when: packages__submodules_versioncheck | bool
|
||||
tags: skip_ansible_lint_template-instead-of-copy
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# must-have packages for all systems
|
||||
package__base:
|
||||
packages__base:
|
||||
- rsync
|
||||
- tmux
|
||||
- sudo
|
||||
|
@ -16,7 +16,7 @@ package__base:
|
|||
- lsof
|
||||
- pwgen
|
||||
|
||||
package__advanced:
|
||||
packages__advanced:
|
||||
- tcpdump
|
||||
- sysstat
|
||||
- debian-goodies
|
||||
|
@ -31,12 +31,12 @@ package__advanced:
|
|||
- python3-apt
|
||||
- ethstatus
|
||||
|
||||
package__python:
|
||||
packages__python:
|
||||
- python3-pip
|
||||
- python3-dev
|
||||
- python3
|
||||
|
||||
package__cli:
|
||||
packages__cli:
|
||||
- links
|
||||
- ranger
|
||||
- htop
|
||||
|
@ -51,5 +51,5 @@ package__cli:
|
|||
- jq
|
||||
- zstd
|
||||
|
||||
playbook_version_number: 8
|
||||
playbook_version_path: 'l3d.base.packages.version'
|
||||
packages__playbook_version_number: 9
|
||||
packages__playbook_version_path: 'l3d.base.packages.version'
|
||||
|
|
Loading…
Reference in a new issue