Good day, I am trying to add users to the local admin group but on a minimal list. I have used the following code however it still throws errors if a local account is added or a sid is unresolvable.
#Class Profile Server.admin group class profile::windows::groups::server_admin { if ($::role != 'domain_controller') { if ($::add_admin_group == 't') { $admins = lookup('ad.localadmin') $localadmins = concat($admins, [ "${facts['domain']}\\${facts['hostname']}.admin"]) } else { $localadmins = lookup('ad.localadmin') } case $facts['kernel'] { 'Linux': { } 'windows': { group { 'Administrators': ensure => present, members => $localadmins, auth_membership => false, } } default: { fail("Unsupported kernel: ${facts['kernel']} - ${facts['os']['release']['major']}") } } } } Any help would be greatly appreciated. Thank you -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/08719bd8-db64-43a1-8e8a-3d0258055e04%40googlegroups.com.