feat: adding telegraf to docker group if docker is installed
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
20fd717e0b
commit
700396cc31
@ -27,6 +27,17 @@
|
|||||||
state: latest
|
state: latest
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Gather the package facts
|
||||||
|
ansible.builtin.package_facts:
|
||||||
|
manager: auto
|
||||||
|
|
||||||
|
- name: Add telegraf to docker group
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: telegraf
|
||||||
|
groups: docker
|
||||||
|
append: true
|
||||||
|
when: "'docker-ce' in ansible_facts.packages"
|
||||||
|
|
||||||
- name: Enable telegraf service
|
- name: Enable telegraf service
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: telegraf
|
name: telegraf
|
||||||
|
Loading…
Reference in New Issue
Block a user