#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Install and configure Influxdb
  block:
    - name: Install package
      apt:
        name:
          - influxdb
    - name: Template out config
      template:
        src: "influxdb.conf"
        dest: "/etc/influxdb/influxdb.conf"
      notify: restart influxdb
    - name: Start and enable Influxdb
      systemd:
        name: influxdb
        enabled: yes
        state: started
  become: yes