52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
---
|
|
###########################################################
|
|
#
|
|
# This role will install the monitorix system monitoring
|
|
# application.
|
|
#
|
|
# requires that the "monitorix_pkg" variable be set
|
|
# - this variable will hold the name of the desired
|
|
# package to install from https://www.monitorix.org.
|
|
#
|
|
###########################################################
|
|
# tasks file for monitorix
|
|
|
|
- name: Retrieve the monitorix deb package from monitorix.org
|
|
get_url:
|
|
url: "https://www.monitorix.org/{{ monitorix_pkg }}"
|
|
dest: "/tmp/{{ monitorix_pkg }}"
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Install monitorix deb package (Debian)
|
|
apt:
|
|
deb: "/tmp/{{ monitorix_pkg }}"
|
|
state: present
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Install monitorix AUR package (Arch)
|
|
kewlfft.aur.aur:
|
|
name: monitorix
|
|
state: present
|
|
become: true
|
|
become_user: aur_builder
|
|
when: ansible_os_family == "Archlinux"
|
|
|
|
- name: Copy custom config file to /etc/monitorix/conf.d
|
|
template:
|
|
src: files/10-ansible-install.conf.j2
|
|
dest: /etc/monitorix/conf.d/10-ansible-install.conf
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
|
|
- name: Restart the monitorix service to enable custom config
|
|
systemd:
|
|
name: monitorix
|
|
state: restarted
|
|
daemon_reload: yes
|
|
|
|
# EOF
|