diff --git a/defaults/main.yml b/defaults/main.yml index a618670..7195e1f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,16 +2,20 @@ # # newrelic_license_key: yourkey -# user name +# User name newrelic_user: newrelic +# User group +newrelic_group: newrelic +# User groups to append to user +newrelic_groups: [] # Name of the file where the server monitor will store it's log messages. newrelic_logfile: /var/log/newrelic/nrsysmond.log # Level of detail you want in the log file newrelic_loglevel: info # Set to true to disable NFS client statistics gathering. -newrelic_disable_nfs: no +newrelic_disable_nfs: yes # Set to true to disable Docker container statistics gathering. -newrelic_disable_docker: no +newrelic_disable_docker: yes # start on boot newrelic_service_enabled: yes # current state: started, stopped diff --git a/tasks/config.yml b/tasks/config.yml index 3ab5007..409a08b 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -5,9 +5,15 @@ src: "{{ item }}.j2" dest: "/{{ item }}" owner: "{{ newrelic_user }}" - group: "{{ newrelic_user }}" + group: "{{ newrelic_group }}" mode: "0640" notify: restart newrelic with_items: - "etc/newrelic/nrsysmond.cfg" +- name: Configuring user groups + user: + name: "{{ newrelic_user }}" + groups: "{{ newrelic_groups }}" + append: yes + when: not newrelic_disable_docker diff --git a/tasks/service.yml b/tasks/service.yml index 7976fb4..c5314c3 100644 --- a/tasks/service.yml +++ b/tasks/service.yml @@ -5,7 +5,3 @@ name: newrelic-sysmond state: "{{ newrelic_service_state }}" enabled: "{{ newrelic_service_enabled }}" - -- name: Add newrelic user to docker group - user: name=newrelic append=yes groups=docker - when: not newrelic_disable_docker