debops-contrib / ansible-checkmk_server

Setup Check_MK monitoring server
GNU General Public License v3.0
9 stars 3 forks source link

become_flags are sudo-specific #65

Open fabianfreyer opened 6 years ago

fabianfreyer commented 6 years ago

When become_method is not sudo, the following become_flags don't really make sense:

https://github.com/debops-contrib/ansible-checkmk_server/blob/22149b9d5ae6929af6af752f7155341521409b65/tasks/site.yml#L146

https://github.com/debops-contrib/ansible-checkmk_server/blob/22149b9d5ae6929af6af752f7155341521409b65/tasks/site.yml#L179

e.g. for su, the corresponding flag should be -l. If there is a hard dependency on sudo, then IMHO become_method should be specified for those tasks.

ganto commented 6 years ago

Good point, thanks. This role urgently needs a general overhaul, I'll definitely add this to the list of stuff being looked at. If it's urgent for you to be fixed, I'll gladly accept a PR. 😃