treasure-data / chef-td-agent

Chef Cookbook for td-agent (Treasure Agent or Fluentd)
https://supermarket.chef.io/cookbooks/td-agent
Apache License 2.0
127 stars 121 forks source link

Make system user & group as attributes #80

Closed FenrirUnbound closed 8 years ago

FenrirUnbound commented 8 years ago

Currently, the cookbook has the user and group 'td-agent' as a hard-coded value in a couple of resource blocks. This change refactors the constant values and defines the user & group as attributes instead.

This will help us with our situation described in issue #78

FenrirUnbound commented 8 years ago

One thing I would like to point out is that this was mainly a refactoring effort. As such, I didn't modify any of the serverspec tests and only focused on the current set being able to pass (since the functionality should still be the same).

I initially added assertions that 'td-agent' was still the user & group, but decided against it in fear that it would create extra noise with little value gained.

yyuu commented 8 years ago

Could you modify the resource definitions of user and group with using the attributes you added? Others look good to me. Thanks :+1:

FenrirUnbound commented 8 years ago

@yyuu Thanks for the suggestion :smile_cat:

I've gone ahead and used the attributes in the user & group resources. Are you ok with the multiple commits, or do you prefer that I squash them into a single commit?

yyuu commented 8 years ago

Looks better now :+1: You don't have to squash then all. Thanks~