add refresh_api to jenkinsfile
This commit is contained in:
1 parent
280066436a
commit
67f3f8440b
12 files changed
+161
-63
No files matched your search
@@ -0,0 +1 @@
|
||||
powershell -executionpolicy bypass -Command \\home.cosmos\netlogon\cosmosrm.ps1
|
||||
@@ -0,0 +1,17 @@
|
||||
# script for setting ansible service account to registry key
|
||||
$username = "cosmos-ansible"
|
||||
$ansible_registry = "HKLM:\SOFTWARE\Cosmos\Ansible"
|
||||
$password_key = "Password"
|
||||
$password = (Get-ItemProperty $ansible_registry).$password_key
|
||||
# This is what the thing needs to set the password
|
||||
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
|
||||
# Set password
|
||||
$UserAccount = Get-LocalUser -Name $username
|
||||
$UserAccount | Set-LocalUser -Password $securePassword
|
||||
|
||||
# Make it a local admin
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $username
|
||||
|
||||
# Various Ansible Settings
|
||||
Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true
|
||||
Enable-WSManCredSSP -Role Server -Force
|
||||
Reference in new issue
Block a user