dj-wasabi/ansible-zabbix-agent

Wrong permissions on /etc/zabbix/zabbix_agentd.d

konstantin-kornienko opened this issue · 1 comments

Role sets permissions on /etc/zabbix/zabbix_agentd.d

with the following task:

  • name: "Create include dir zabbix-agent"
    file:
    path: "{{ zabbix_agent_include }}"
    owner: root
    group: root
    state: directory
    become: yes
    tags:
    • config
    • include

At lease on Ubuntu it makes following resulting permissions:
drwxr-x--- 2 root root 4096 Jul 24 20:04 zabbix_agentd.d

This directory becomes unavailable for zabbix user, so zabbix agent can't load userparameters from it.

Using latest version of role with ansible 2.7

Targetted hosts

  • Ubuntu 18

Expected behavior
Correct permissions should be:
drwxr-x--- 2 root zabbix 4096 Jul 24 20:04 zabbix_agentd.d

Suggested task:

  • name: "Create include dir zabbix-agent"
    file:
    path: "{{ zabbix_agent_include }}"
    owner: root
    group: zabbix
    state: directory
    mode: 'u=rwX,g=rX,o='
    become: yes
    tags:
    • config
    • include

Thanks a lot!