Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rights on the log file #195

Open
bfontaine opened this issue Feb 12, 2025 · 0 comments
Open

Fix rights on the log file #195

bfontaine opened this issue Feb 12, 2025 · 0 comments

Comments

@bfontaine
Copy link

Hello,
I’m not sure if this is an issue with my setup or the playbook. On my Ubuntu servers the "Restart Telegraf" step fails because the log file /var/log/telegraf.log is not writable by telegraf. I tried to fix the issue by creating the file before the role, but I can’t chown it to telegraf since the user is created by the role.

This is the relevant part of my playbook:

- ansible.builtin.include_role:
    name: dj-wasabi.telegraf
  vars:
    telegraf_agent_output:
      - type: influxdb_v2
        config: {} # ...
    telegraf_agent_logfile: "/var/log/telegraf.log"
    telegraf_agent_package_state: latest
    telegraf_plugins_default: [ ]

Should there be a way to specify the owner/group of telegraf_agent_logfile in this role?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant