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
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Clone PVE-mods repository
|
||||
ansible.builtin.git:
|
||||
repo: "https://github.com/Meliox/PVE-mods.git"
|
||||
dest: "/opt/PVE-mods"
|
||||
version: "main"
|
||||
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: Download the PVE GUI sensors script
|
||||
ansible.builtin.get_url:
|
||||
url: https://raw.githubusercontent.com/Meliox/PVE-mods/refs/heads/main/pve-mod-gui-sensors.sh
|
||||
dest: /tmp/pve-mod-gui-sensors.sh
|
||||
mode: '0755' # Make it executable
|
||||
|
||||
- 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
|
||||
when: pve_mod_gui_sensors_installed | default(false)
|
||||
|
||||
@@ -47,7 +39,7 @@
|
||||
|
||||
- name: Run pve-mod-gui-sensors script with predefined answers
|
||||
expect:
|
||||
command: bash /usr/local/src/pve-mod-gui-sensors.sh install
|
||||
command: bash /tmp/pve-mod-gui-sensors.sh install
|
||||
responses:
|
||||
'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'
|
||||
|
||||
Reference in New Issue
Block a user