how to use defualts and two user in augeas sudo
Generally I use templates to maintain sudoers, but I tried to implement in augeas just to understand augeas better and also it worked for few user. But I faced issues with defaults and passing two user
Defaults always_set_home Defaults requiretty use01,user02 ALL = NOPASSWD: /sbin/service
when I print in augtool and get
/files/etc/sudoers/Defaults /files/etc/sudoers/Defaults/requiretty /files/etc/sudoers/Defaults /files/etc/sudoers/Defaults/visiblepw /files/etc/sudoers/Defaults/visiblepw/negate /files/etc/sudoers/spec/user = "user01" /files/etc/sudoers/spec/user = "user02"
But when I try to convert into puppet with augeas resource getting error could not do that
changes => "set Defaults/requirettty/ ' '" changes => "set Defaults/visiblepw/negate ' '" $var = ["user01","user02"] changes => "set spec[user=$var]/user $var", "set spec[user = $var]/host_group/host ALL", "set spec[user = $var]/host_group/tag NOPASSWD",
For Defaults, either not getting error or not printing any value in /etc/sudoers file.
For two user, it is taking as [user='user01user02'] a single user with error. But I want this as [user='user01,'user02'] two separate user.
is it possible in augeas.