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.
50 lines
1.4 KiB
YAML
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
|