weareinteractive / ansible-newrelic

Ansible role which installs and configures New Relic Server Monitoring Daemon
MIT License
43 stars 28 forks source link

Default groups [] breaks install when docker monitoring is enabled. #7

Closed joe1chen closed 8 years ago

joe1chen commented 8 years ago

Ansible version: ansible 1.9.5 OS: Mac OS X El Capitan 10.11.4

When newrelic_disable_docker is set to no and newrelic_groups is left with the default value of [], this breaks the install because ansible expects groups to take in a comma-delimited string of groups, and not [].

So I just set the default value to '', which should work. Also, added some notes regarding docker container monitoring. In my installation of docker, the docker group does not exist, but I just set it to root and container monitoring works fine.

franklinkim commented 8 years ago

yeah, newrelic_groups should definitely be a comma separated list when using with ansible user but I think we'll leave it as an array and convert it in the task like this:

- name: Configuring user groups
  user:
    name: "{{ newrelic_user }}"
    groups: "{{ newrelic_groups|join(',') }}"
    append: yes
  when: not newrelic_disable_docker

can u update your PR

joe1chen commented 8 years ago

Done!

franklinkim commented 8 years ago

THX.