This commit adds a step to verify that git is installed on the system before proceeding with the installation of proxmoxer. This ensures compatibility and prevents potential errors during the setup process.
41 lines
1012 B
YAML
41 lines
1012 B
YAML
- name: Setup Proxmox
|
|
hosts: proxmox
|
|
become: true
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Ensure git is installed
|
|
ansible.builtin.apt:
|
|
name: git
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Install proxmoxer from APT
|
|
ansible.builtin.apt:
|
|
name: python3-proxmoxer
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Install lm-sensors from APT
|
|
ansible.builtin.apt:
|
|
name: lm-sensors
|
|
state: present
|
|
|
|
- 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"
|
|
|
|
- name: Run script with predefined input
|
|
ansible.builtin.shell: |
|
|
printf "a\nC\nN\n2\n" | /usr/local/bin/pve-mod-gui-sensors.sh
|
|
|