Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
966 B

---
- name: Install hardware sensors support
apt:
name:
- smartmontools
- lm-sensors
when: ansible_virtualization_role != "guest"
tags: zabbix
- name: Check if lm-sensors is configured
stat: path=/etc/sysconfig/lm_sensors
register: lm_sensors
when: ansible_virtualization_role != "guest"
tags: zabbix
- name: Check if there's an ipmi controler
stat: path=/dev/ipmi0
register: zabbix_ipmi
tags: zabbix
- name: Install ipmi support
apt:
name:
- openipmi
- ipmitool
when:
- ansible_virtualization_role != "guest"
- zabbix_ipmi.stat.exists
tags: zabbix
- name: Start and enable lm_sensors service
service: name=lm-sensors state=started enabled=yes
when: ansible_virtualization_role != "guest"
tags: zabbix
- name: Start and enable ipmi service
service: name=ipmievd state=started enabled=yes
when:
- ansible_virtualization_role != "guest"
- zabbix_ipmi.stat.exists
tags: zabbix