saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
105 stars 215 forks source link

sudo config objects with spaces in their name fail visudo file checks #132

Closed tedivm closed 8 years ago

tedivm commented 9 years ago

This fails:

  sudo::conf { 'vagrant user':
    priority => 15,
    content  => "vagrant ALL=(ALL) NOPASSWD: ALL",
  }

This works:

  sudo::conf { 'vagrant_user':
    priority => 15,
    content  => "vagrant ALL=(ALL) NOPASSWD: ALL",
  }

It seems the code does not normalize the namevar to remove spaces. If alphanumeric is required throwing an error would be good.