Closed guimaluf closed 4 years ago
The main reason is that in the cluster I'm working with the /usr/local/bin is a mounted directory which I don't have permissions to change.
I'm aware that the correct hierarchy resides on /usr/local/bin that manner I keep the default as it is. I could remove the task where the directory is created and let just as an option.
I don't mean to change the default behaviour. Just make it customizable.
After I merged it, I remembered one problem with this approach here and in previous designs. Always someone proposed to include a task responsible for creating a directory where node_exporter binary would be placed. This, in turn, had huge impact on managing directory permissions in default installations as we are by default making this role responsible for managing /usr/local/bin
ownership (in https://github.com/cloudalchemy/ansible-node-exporter/blob/d08e7c2bc0c94baa65ffb72e58cce2db015eed45/tasks/install.yml#L2-L7).
This task will be removed in future PR and if anyone wants to create a directory, then he/she needs to do it on a playbook level as managing system directories is out of scope for this role.
Binaries are currently droped in /usr/local/bin
This commit add
node_exporter_binary_install_dir
variable where user can change the binary destination to/opt/bin
for example.