27 lines
727 B
YAML
27 lines
727 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.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/docker-compose-telegraf.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
|