Skip to content

Instantly share code, notes, and snippets.

@iversond
Created November 7, 2017 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iversond/d061d67c47a330d8e18d82db9bc7eb77 to your computer and use it in GitHub Desktop.
Save iversond/d061d67c47a330d8e18d82db9bc7eb77 to your computer and use it in GitHub Desktop.
$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