Files
ansible_role_proxmox_provision/tasks/subscription.yml
Jose abdba53053
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
refactor ♻️: Refactor logrotate tasks for better readability and consistency - Rename 'logrotate reload' task to 'Logrotate reload' - Refactor task names in subscription.yml for better organization and clarity
This commit refactors the logrotate tasks by renaming them for better readability and consistency, and refactoring task names in `subscription.yml` for improved organization and clarity.
2026-02-09 18:20:19 +01:00

50 lines
1.4 KiB
YAML

---
- name: subscription | Ensure /usr/local/bin exists
ansible.builtin.file:
path: /usr/local/bin
state: directory
owner: root
group: root
mode: "0755"
- name: subscription | Check for legacy proxmoxlib.js
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
register: proxmoxlib_js
- name: subscription | Install pve-remove-nag script
ansible.builtin.copy:
src: pve-remove-nag.sh
dest: /usr/local/bin/pve-remove-nag.sh
owner: root
group: root
mode: "0755"
when: proxmoxlib_js.stat.exists
- name: subscription | Install APT post-invoke hook for nag removal
ansible.builtin.copy:
dest: /etc/apt/apt.conf.d/no-nag-script
owner: root
group: root
mode: "0644"
content: |
DPkg::Post-Invoke { "/usr/local/bin/pve-remove-nag.sh"; };
############################
# Legacy proxmoxlib.js
############################
- name: subscription | Check for legacy proxmoxlib.js
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
register: proxmoxlib_js
- 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