--- - name: Download telegraf get_url: url: https://github.com/x70b1/telegraf-edgeos/releases/download/v{{ telegraf.release }}/telegraf_{{ telegraf.release }}+{{ telegraf.flavour }}_{{ telegraf.arch }}.deb dest: /tmp/telegraf.deb - name: Install telegraf shell: cmd: dpkg -i /tmp/telegraf.deb - name: create directory for configuration file: path: "/etc/telegraf" state: directory mode: 0755 - name: copy configuration copy: src: "telegraf.conf" dest: "/etc/telegraf/telegraf.conf" - name: start and enable telegraf systemd: name: docker state: started enabled: true - name: Remove telegraf.deb file file: path: /tmp/telegraf.deb state: absent