Created
November 7, 2017 00:44
-
-
Save iversond/d061d67c47a330d8e18d82db9bc7eb77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$domain_user = hiera('domain_user', undef) | |
$domain_password = hiera('domain_password', undef) | |
$pia_domain_list = hiera_hash('pia_domain_list') | |
$pia_domain_list.each |$domain_name, $pia_domain_info| { | |
$ps_cfg_home_dir_norm = normalize_path($pia_domain_info['ps_cfg_home_dir']) | |
exec { "${domain_name}-user": | |
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"PsftPIADomain${domain_name}Service\" obj= \"${domain_user}\" password= \"${domain_password}\"" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment