mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-16 16:01:35 +00:00
perf: use access_key file first
This commit is contained in:
parent
9f9a106f92
commit
6208f574a1
@ -47,7 +47,7 @@
|
||||
$random = -join ((1..$Length) | ForEach-Object { $chars[(Get-Random -Maximum $chars.Length)] })
|
||||
return $random
|
||||
}
|
||||
$targetPath = "$env:USERPROFILE\AppData\Local\Programs\Tinker\data\keys\.access_key"
|
||||
$targetPath = "$env:USERPROFILE\AppData\Local\Programs\Tinker\data\keys\access_key"
|
||||
if (Test-Path -Path $targetPath) {
|
||||
Write-Output "access_key already exists at $targetPath"
|
||||
return
|
||||
@ -286,6 +286,19 @@
|
||||
script: |
|
||||
tinkerd config --hostname {{ HOST_NAME }} --core_host {{ CORE_HOST }} --token {{ BOOTSTRAP_TOKEN }} --host_id {{ HOST_ID }} --ignore-verify-certs {{ IGNORE_VERIFY_CERTS }}
|
||||
|
||||
- name: Rename tinkerd keyfile
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$source = "$env:USERPROFILE\AppData\Local\Programs\Tinker\data\keys\access_key"
|
||||
$destination = "$env:USERPROFILE\AppData\Local\Programs\Tinker\data\keys\.access_key"
|
||||
if (Test-Path $destination) {
|
||||
$timestamp = Get-Date -Format "yyyyMMddHHmmss"
|
||||
Rename-Item -Path $destination -NewName (Split-Path -Leaf "$destination.bak.$timestamp" )
|
||||
}
|
||||
if (Test-Path $source) {
|
||||
Rename-Item -Path $source -NewName (Split-Path -Leaf $destination)
|
||||
}
|
||||
|
||||
- name: Install tinkerd service
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
|
Loading…
Reference in New Issue
Block a user