debops / ansible-console

Configure system console and terminal-related options
GNU General Public License v3.0
13 stars 10 forks source link

Fix empty hidepid_group interpreted as matches all groups #26

Closed prahal closed 8 years ago

prahal commented 8 years ago

If hidepid_group is empty then "getent group " matches all. Accordingly hidepid_group mutates in a string matching the full set of locally available groups. This issue arise when a host has: console_proc_hidepid: False

drybjed commented 8 years ago

Ykes! Thanks for catching that. :-)

drybjed commented 8 years ago

Although, I'd add an else with empty hidepid_group variable, so that roles that use it won't break on undefined variable not being present in local facts.

prahal commented 8 years ago

The group variable ends up with the full list of groups for the system : this become an issue with debops.snmpd:

TASK [debops.snmpd : Allow 'snmp' user access to /proc if  needed]                                                   /
fatal: [<target host>]: FAILED! => {"changed": false, "failed": true, "msg": "Group <the full list of groups> does not exist"}
drybjed commented 8 years ago

Ah, never mind, the variable is set as empty at the beginning of the script.