All checks were successful
ansible-lint / Ansible Lint (push) Successful in 12s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 24s
ansible-lint / Ansible Lint (pull_request) Successful in 12s
Gitleaks Scan / gitleaks (pull_request) Successful in 5s
Markdown Lint / markdown-lint (pull_request) Successful in 5s
This commit refactors the task names to improve readability and adds a namespace to avoid conflicts with other modules. It also fixes typos in task names and updates module references accordingly.
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
---
|
|
- name: subscription | Ensure nag patch state directory exists
|
|
ansible.builtin.file:
|
|
path: /var/lib/proxmox-nag-patch
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
############################
|
|
# Legacy proxmoxlib.js
|
|
############################
|
|
|
|
- name: subscription | Check for legacy proxmoxlib.js
|
|
ansible.builtin.stat:
|
|
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
|
checksum_algorithm: sha256
|
|
register: proxmoxlib_js
|
|
|
|
- name: subscription | Read stored checksum (legacy)
|
|
ansible.builtin.slurp:
|
|
src: /var/lib/proxmox-nag-patch/proxmoxlib.js.sha256
|
|
register: proxmoxlib_js_checksum_stored
|
|
when: proxmoxlib_js.stat.exists
|
|
failed_when: false
|
|
|
|
- name: subscription | Trigger legacy nag patch if needed
|
|
ansible.builtin.meta: flush_handlers
|
|
when:
|
|
- proxmoxlib_js.stat.exists
|
|
- proxmoxlib_js_checksum_stored.content is not defined
|
|
or proxmoxlib_js.stat.checksum
|
|
!= (proxmoxlib_js_checksum_stored.content | b64decode | trim)
|
|
notify: Ppatch legacy proxmoxlib.js
|
|
|
|
############################
|
|
# Minified proxmoxlib.min.js (VE 8/9)
|
|
############################
|
|
|
|
- name: subscription | Check for minified proxmoxlib.min.js (VE 8/9)
|
|
ansible.builtin.stat:
|
|
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.min.js
|
|
checksum_algorithm: sha256
|
|
register: proxmoxlib_min_js
|
|
|
|
- name: subscription | Read stored checksum (minified)
|
|
ansible.builtin.slurp:
|
|
src: /var/lib/proxmox-nag-patch/proxmoxlib.min.js.sha256
|
|
register: proxmoxlib_min_checksum_stored
|
|
when: proxmoxlib_min_js.stat.exists
|
|
failed_when: false
|
|
|
|
- name: subscription | Trigger minified nag patch if needed
|
|
ansible.builtin.meta: flush_handlers
|
|
when:
|
|
- proxmoxlib_min_js.stat.exists
|
|
- proxmoxlib_min_checksum_stored.content is not defined
|
|
or proxmoxlib_min_js.stat.checksum
|
|
!= (proxmoxlib_min_checksum_stored.content | b64decode | trim)
|
|
notify: Patch minified proxmoxlib.js
|