sous-chefs / consul

Development repository for the consul cookbook
https://supermarket.chef.io/cookbooks/consul
Apache License 2.0
192 stars 244 forks source link

Fix /opt/consul permissions #441

Closed moofish32 closed 7 years ago

moofish32 commented 7 years ago

The recursive call on the directory in service provider overrides the configuration previously setup for the /opt/consul directory

legal90 commented 7 years ago

Hi @moofish32, You probably missed something, because data_dir param of consul_service resource defaults to /var/lib/consul: https://github.com/johnbellone/consul-cookbook/blob/d1a4af3bb2d7b26c57df82f7671e019f9df4601e/libraries/helpers.rb#L44

So, it doesn't not affect consul installation path /opt/consul, which is managed in consul_installation resource: https://github.com/johnbellone/consul-cookbook/blob/master/libraries/consul_installation_binary.rb#L45

legal90 commented 7 years ago

Also, "recursive" param of directory resource only means that the whole directory structure will be created. It doesn't affect permissions mode. E.q. it is not an analogue of (chmod -R) - "mode" value will be applied only to the leaf directory, regardless of the "recursive" value. https://docs.chef.io/resource_directory.html#recursive-directories

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.