26 lines
736 B
YAML
26 lines
736 B
YAML
- name: Create telegraf install directory
|
|
file:
|
|
path: /opt/telegraf
|
|
state: directory
|
|
owner: "{{ docker_user.name }}"
|
|
mode: "{{ docker_compose_directory_mask }}"
|
|
become: true
|
|
|
|
- name: Install telegraf config
|
|
template:
|
|
src: files/telegraf/telegraf.conf
|
|
dest: /opt/telegraf/telegraf.conf
|
|
mode: "{{ docker_compose_file_mask }}"
|
|
owner: "{{ docker_user.name }}"
|
|
notify: restart telegraf
|
|
become: true
|
|
|
|
- name: Install telegraf compose file
|
|
template:
|
|
src: files/telegraf/docker-compose.yml
|
|
dest: /opt/telegraf/docker-compose.yml
|
|
mode: "{{ docker_compose_file_mask }}"
|
|
owner: "{{ docker_user.name }}"
|
|
validate: docker-compose -f %s config
|
|
notify: restart telegraf
|
|
become: true
|