bundle agent manage_users {My problem is that if the line with the sudo definition is commented out, it puts the following into the sudoers file:
vars:
"users[umanager][class]" string => "devnewhire";
"users[umanager][uid]" string => "5100";
"users[umanager][fullname]" string => "devnewhire";
"users[umanager][shell]" string => "/bin/bash";
"users[umanager][password]" string => "$1$RZF2UsUb$YamUzj2cR25KqvfpcdRwy0";
# "users[umanager][sudo]" string => "ALL=(ALL) ALL";
methods:
"users" usebundle => sys_create_users("manage_users.users");
"new_users" usebundle => sys_create_users("manage_users.internap_users");
}
bundle agent sys_create_users(info) {
vars:
"user" slist => getindices("$(info)");
"sudoers" string => "/etc/sudoers";
classes:
# "add_$(user)" not => userexists("$(user)");
"add_$($(info)[$(user)][class])" not => userexists("$(user)");
files:
linux::
"$(sudoers)" -> "Security Policy"
comment => "Append common configuration to sudoers",
edit_line => append_if_no_line("$(user) $($(info)[$(user)][sudo])");
}
umanager $(manage_users.users[umanager][sudo])
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.