diff options
author | Niklas Yann Wettengel <niyawe@niyawe.de> | 2019-04-13 01:29:23 +0200 |
---|---|---|
committer | Niklas Yann Wettengel <niyawe@niyawe.de> | 2019-04-13 01:29:23 +0200 |
commit | 43ed9c0c883f2532c30b309dd9a6a8316199909b (patch) | |
tree | 4bff6aedaa8b72ab9a270ca7960ad1f247c4d526 /roles/install_monitoring/tasks/install_vnstat.yml | |
parent | 2befca5ea47dd361d0db44efb0a6d8ce3b011fd7 (diff) |
nat64
Diffstat (limited to 'roles/install_monitoring/tasks/install_vnstat.yml')
-rw-r--r-- | roles/install_monitoring/tasks/install_vnstat.yml | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/roles/install_monitoring/tasks/install_vnstat.yml b/roles/install_monitoring/tasks/install_vnstat.yml deleted file mode 100644 index 4027aa6..0000000 --- a/roles/install_monitoring/tasks/install_vnstat.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -- name: install vnstat - pacman: - name: vnstat - state: present - -- name: start and enable vnstat service - systemd: - name: vnstat.service - enabled: yes - state: started - -- name: add interfaces to vnstat for batman interfaces - command: /usr/bin/vnstat -u -i bat{{ item.name }} - args: - creates: '/var/lib/vnstat/bat{{ item.name }}' - with_items: "{{ sites }}" - when: "'fastd' in group_names" - -- name: add interfaces to vnstat for uplink interfaces - command: /usr/bin/vnstat -u -i bb{{ hostvars[item]['wireguard_bb_name'] }} - args: - creates: "/var/lib/vnstat/bb{{ hostvars[item]['wireguard_bb_name'] }}" - with_items: - - "{{ groups['uplink'] }}" - when: "'fastd' in group_names" - -- name: add interfaces to vnstat for outgoing v4 interface - command: /usr/bin/vnstat -u -i {{ ansible_default_ipv4.interface }} - args: - creates: '/var/lib/vnstat/{{ ansible_default_ipv4.interface }}' - -- name: add interfaces to vnstat for outgoing v6 interface - command: /usr/bin/vnstat -u -i {{ ansible_default_ipv6.interface }} - args: - creates: '/var/lib/vnstat/{{ ansible_default_ipv6.interface }}' - -- name: add output folder for vnstat graphs - file: - path: /srv/http/vnstat - state: directory - -- name: install gd which is needed for graph generation - pacman: - name: gd - state: present - -- name: add bash script to generate vnstat graphs - copy: - src: vnstat.sh - dest: /usr/local/bin/vnstat.sh - mode: 0744 - -- name: add cronjob to generate vnstat graphs - cron: - name: vnstat - minute: '*/5' - user: root - cron_file: vnstat - job: '/usr/local/bin/vnstat.sh' - -- name: add vnstat nginx config - copy: - src: vnstat - dest: /etc/nginx/sites-available/vnstat - notify: reload nginx - -- name: enable vnstat nginx config - file: - src: /etc/nginx/sites-available/vnstat - dest: /etc/nginx/sites-enabled/vnstat - state: link - notify: reload nginx |