ansible-ffibk/roles/service-vnstat/tasks/main.yml

24 lines
411 B
YAML
Raw Normal View History

2017-12-31 12:40:00 +01:00
---
- name: install vnstat packages
package:
name: "{{ item }}"
state: present
loop:
2017-12-31 12:40:00 +01:00
- 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