feat: add user groups

This commit is contained in:
Adrien Waksberg 2022-05-03 10:01:59 +02:00
parent 123b83c869
commit 4426dbe53f
3 changed files with 15 additions and 0 deletions

View file

@ -55,6 +55,13 @@ Install and configure Telegraf
files: ['stdout', '/tmp/metrics.out'] files: ['stdout', '/tmp/metrics.out']
``` ```
* `telegraf_user_groups` - array with the telegraf unix groups
```
- docker
- admin
```
* `telegraf_proxy_url` - set a proxy url for http and https requests * `telegraf_proxy_url` - set a proxy url for http and https requests
* `telegraf_proxy_ignore` - array with ignore host or subnet * `telegraf_proxy_ignore` - array with ignore host or subnet

View file

@ -16,3 +16,4 @@ telegraf_full_config: '{{ telegraf_default_config|combine(telegraf_config) }}'
telegraf_inputs: {} telegraf_inputs: {}
telegraf_outputs: {} telegraf_outputs: {}
telegraf_proxy_ignore: [] telegraf_proxy_ignore: []
telegraf_user_groups: []

View file

@ -23,6 +23,13 @@
- telegraf - telegraf
tags: telegraf tags: telegraf
- name: add groups for telegraf user
ansible.builtin.user:
name: telegraf
groups: '{{ telegraf_user_groups }}'
notify: restart telegraf
tags: telegraf
- name: copy default variables file - name: copy default variables file
ansible.builtin.template: ansible.builtin.template:
src: default.j2 src: default.j2