weareinteractive / ansible-sudo

Ansible role which installs and configures sudo
MIT License
42 stars 45 forks source link

Create a Host_Alias section in the sudoer file when multiple hosts are specified. #30

Open bschonec opened 5 years ago

bschonec commented 5 years ago

It doesn't look like the sudo_users.hosts variable supports an array. It would be nice to be able to input the hosts as an array and have the role create a Host_Alias section and then reference the Host_Alias in the configuration line:

sudo_users:

Resulting sudoers file:

Host_Alias ORACLE_SERVERS=oracle1.example.org,oracle2.example.org oracle ORACLE_SERVERS=(root) NOPASSWD: ALL

This would of course rely on #30

bschonec commented 5 years ago

Available in #31

franklinkim commented 5 years ago

hi, I think adding aliases is a good idea, I will comment on #31