Deploying telegraf configs from etc/kayobe impossible?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kayobe |
Fix Released
|
Medium
|
Will Szumski | ||
Antelope |
Confirmed
|
Medium
|
Unassigned | ||
Bobcat |
Confirmed
|
Medium
|
Unassigned | ||
Caracal |
Fix Released
|
Medium
|
Will Szumski | ||
Zed |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Env: 2023.1
I am trying to deploy a telegraf config just called global.conf to all nodes that have telegraf, in this case my controller.
For prometheus, I can create a file etc/kolla/
- name: Find prometheus common config overrides
find:
# NOTE(wszumski): Non-existent paths don't produce a failure
paths:
- "{{ node_custom_config }}/prometheus/
patterns: "*.yml"
delegate_to: localhost
register: prometheus_
and then later:
- name: Copying over prometheus config file
become: true
vars:
service: "{{ prometheus_
common_
That's great, because then I can have the config files in etc/kayobe/kolla/..
For telegraf, there is a task for copying telegraf plugin files, but the source path seems to be in venvs/kolla-
- name: Copying over telegraf plugin files
vars:
service: "{{ telegraf_
copy:
src: "{{ item }}"
dest: "{{ node_config_
mode: "0660"
become: true
when:
- inventory_hostname in groups[
- item.value.enabled | bool
with_fileglob:
- "{{ role_path }}/templates/
notify:
- Restart telegraf container
Am I misunderstanding what's going on here, or do I really need to copy my telegraf config files into the kolla-ansible venv?
Maybe I'm missing something and there is a functionality for this? I've tried putting the .conf under etc/kolla/
Changed in kayobe: | |
assignee: | nobody → Will Szumski (willjs) |
I just tried putting the global.conf in venvs/. ../telegraf/ templates/ config/ and got this error:
TASK [telegraf : Copying over telegraf plugin files] ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* **** utils.unsafe_ proxy.AnsibleUn safeText object' has no attribute 'value'. 'ansible. utils.unsafe_ proxy.AnsibleUn safeText object' has no attribute 'value'
Friday 09 February 2024 16:03:46 +0000 (0:00:00.595) 0:00:08.677 *******
fatal: [control0]: FAILED! =>
msg: |-
The conditional check 'item.value.enabled | bool' failed. The error was: error while evaluating conditional (item.value.enabled | bool): 'ansible.
The error appears to be in '/home/ ubuntu/ venvs/kolla- ansible/ share/kolla- ansible/ ansible/ roles/telegraf/ tasks/config. yml': line 50, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Copying over telegraf plugin files utils.unsafe_ proxy.AnsibleUn safeText object' has no attribute 'value'. 'ansible. utils.unsafe_ proxy.AnsibleUn safeText object' has no attribute 'value'
^ here
fatal: [control1]: FAILED! =>
msg: |-
The conditional check 'item.value.enabled | bool' failed. The error was: error while evaluating conditional (item.value.enabled | bool): 'ansible.
The error appears to be in '/home/ ubuntu/ venvs/kolla- ansible/ share/kolla- ansible/ ansible/ roles/telegraf/ tasks/config. yml': line 50, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Copying over telegraf plugin files
^ here
Any ideas or guidance would be very appreciated. Thanks!