refactor ♻️: Replace PVE-mods repository cloning with direct script download and execution.
Refactored the project to eliminate the need for cloning a repository by instead downloading and executing a script directly. This simplifies the setup process and reduces dependency on external repositories.
This commit is contained in:
@@ -16,22 +16,14 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
|
|
||||||
- name: Clone PVE-mods repository
|
- name: Download the PVE GUI sensors script
|
||||||
ansible.builtin.git:
|
ansible.builtin.get_url:
|
||||||
repo: "https://github.com/Meliox/PVE-mods.git"
|
url: https://raw.githubusercontent.com/Meliox/PVE-mods/refs/heads/main/pve-mod-gui-sensors.sh
|
||||||
dest: "/opt/PVE-mods"
|
dest: /tmp/pve-mod-gui-sensors.sh
|
||||||
version: "main"
|
mode: '0755' # Make it executable
|
||||||
update: yes
|
|
||||||
|
|
||||||
- name: Install pve-mod-gui-sensors.sh
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: "/opt/PVE-mods/pve-mod-gui-sensors.sh"
|
|
||||||
dest: "/usr/local/bin/pve-mod-gui-sensors.sh"
|
|
||||||
mode: "0755"
|
|
||||||
remote_src: yes
|
|
||||||
|
|
||||||
- name: Run uninstall script
|
- name: Run uninstall script
|
||||||
ansible.builtin.command: bash /usr/local/bin/pve-mod-gui-sensors.sh uninstall
|
ansible.builtin.command: bash /tmp/pve-mod-gui-sensors.sh uninstall
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: pve_mod_gui_sensors_installed | default(false)
|
when: pve_mod_gui_sensors_installed | default(false)
|
||||||
|
|
||||||
@@ -47,7 +39,7 @@
|
|||||||
|
|
||||||
- name: Run pve-mod-gui-sensors script with predefined answers
|
- name: Run pve-mod-gui-sensors script with predefined answers
|
||||||
expect:
|
expect:
|
||||||
command: bash /usr/local/src/pve-mod-gui-sensors.sh install
|
command: bash /tmp/pve-mod-gui-sensors.sh install
|
||||||
responses:
|
responses:
|
||||||
'Display temperatures for all cores \[C\] or average per CPU \[a\].*\(C/a\):.*': 'a'
|
'Display temperatures for all cores \[C\] or average per CPU \[a\].*\(C/a\):.*': 'a'
|
||||||
'Display temperatures in Celsius \[C\] or Fahrenheit \[f\].*\(C/f\):.*': 'c'
|
'Display temperatures in Celsius \[C\] or Fahrenheit \[f\].*\(C/f\):.*': 'c'
|
||||||
|
|||||||
Reference in New Issue
Block a user