ansible-ffibk/roles/service-vnstat/tasks/main.yml
2018-09-18 14:27:58 +02:00

23 lines
411 B
YAML

---
- name: install vnstat packages
package:
name: "{{ item }}"
state: present
loop:
- vnstat
- vnstati
- name: write vnstat.conf
template:
src: vnstat.conf.j2
dest: /etc/vnstat.conf
mode: 0644
owner: root
group: vnstat
notify: restart systemd unit vnstat
- name: enable and start systemd unit vnstat
systemd:
name: vnstat
enabled: yes
state: started