mirror of https://github.com/jumpserver/jumpserver
perf: 优化 RD License 配置
parent
dfa3f4b53b
commit
3cbd772c4e
|
@ -7,7 +7,7 @@
|
||||||
HOST_ID: 00000000-0000-0000-0000-000000000000
|
HOST_ID: 00000000-0000-0000-0000-000000000000
|
||||||
CORE_HOST: https://demo.jumpserver.org
|
CORE_HOST: https://demo.jumpserver.org
|
||||||
BOOTSTRAP_TOKEN: PleaseChangeMe
|
BOOTSTRAP_TOKEN: PleaseChangeMe
|
||||||
RDS_Licensing: true
|
RDS_Licensing: false
|
||||||
RDS_LicenseServer: 127.0.0.1
|
RDS_LicenseServer: 127.0.0.1
|
||||||
RDS_LicensingMode: 4
|
RDS_LicensingMode: 4
|
||||||
RDS_fSingleSessionPerUser: 1
|
RDS_fSingleSessionPerUser: 1
|
||||||
|
@ -16,13 +16,6 @@
|
||||||
TinkerInstaller: Tinker_Installer.exe
|
TinkerInstaller: Tinker_Installer.exe
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install RDS-Licensing (RDS)
|
|
||||||
ansible.windows.win_feature:
|
|
||||||
name: RDS-Licensing
|
|
||||||
state: present
|
|
||||||
include_management_tools: yes
|
|
||||||
when: RDS_Licensing
|
|
||||||
|
|
||||||
- name: Install RDS-RD-Server (RDS)
|
- name: Install RDS-RD-Server (RDS)
|
||||||
ansible.windows.win_feature:
|
ansible.windows.win_feature:
|
||||||
name: RDS-RD-Server
|
name: RDS-RD-Server
|
||||||
|
@ -78,11 +71,23 @@
|
||||||
state: present
|
state: present
|
||||||
register: win_install_python
|
register: win_install_python
|
||||||
|
|
||||||
|
- name: Check pip command exists
|
||||||
|
ansible.windows.win_powershell:
|
||||||
|
script: |
|
||||||
|
if (Get-Command -Name 'pip' -ErrorAction SilentlyContinue) {
|
||||||
|
$Ansible.Changed = $false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$Ansible.Changed = $true
|
||||||
|
}
|
||||||
|
register: check_pip_command
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Reboot if installing requires it
|
- name: Reboot if installing requires it
|
||||||
ansible.windows.win_reboot:
|
ansible.windows.win_reboot:
|
||||||
post_reboot_delay: 10
|
post_reboot_delay: 10
|
||||||
test_command: whoami
|
test_command: whoami
|
||||||
when: rds_install.reboot_required or win_install_python.reboot_required
|
when: check_pip_command.changed or rds_install.reboot_required or win_install_python.reboot_required
|
||||||
|
|
||||||
- name: Set RDS LicenseServer (regedit)
|
- name: Set RDS LicenseServer (regedit)
|
||||||
ansible.windows.win_regedit:
|
ansible.windows.win_regedit:
|
||||||
|
@ -90,6 +95,7 @@
|
||||||
name: LicenseServers
|
name: LicenseServers
|
||||||
data: "{{ RDS_LicenseServer }}"
|
data: "{{ RDS_LicenseServer }}"
|
||||||
type: string
|
type: string
|
||||||
|
when: RDS_Licensing
|
||||||
|
|
||||||
- name: Set RDS LicensingMode (regedit)
|
- name: Set RDS LicensingMode (regedit)
|
||||||
ansible.windows.win_regedit:
|
ansible.windows.win_regedit:
|
||||||
|
@ -97,6 +103,7 @@
|
||||||
name: LicensingMode
|
name: LicensingMode
|
||||||
data: "{{ RDS_LicensingMode }}"
|
data: "{{ RDS_LicensingMode }}"
|
||||||
type: dword
|
type: dword
|
||||||
|
when: RDS_Licensing
|
||||||
|
|
||||||
- name: Set RDS fSingleSessionPerUser (regedit)
|
- name: Set RDS fSingleSessionPerUser (regedit)
|
||||||
ansible.windows.win_regedit:
|
ansible.windows.win_regedit:
|
||||||
|
@ -104,6 +111,7 @@
|
||||||
name: fSingleSessionPerUser
|
name: fSingleSessionPerUser
|
||||||
data: "{{ RDS_fSingleSessionPerUser }}"
|
data: "{{ RDS_fSingleSessionPerUser }}"
|
||||||
type: dword
|
type: dword
|
||||||
|
when: RDS_Licensing
|
||||||
|
|
||||||
- name: Set RDS MaxDisconnectionTime (regedit)
|
- name: Set RDS MaxDisconnectionTime (regedit)
|
||||||
ansible.windows.win_regedit:
|
ansible.windows.win_regedit:
|
||||||
|
@ -183,7 +191,7 @@
|
||||||
|
|
||||||
- name: Generate tinkerd component config
|
- name: Generate tinkerd component config
|
||||||
ansible.windows.win_shell:
|
ansible.windows.win_shell:
|
||||||
"tinkerd config --hostname {{ HOST_NAME }} --core_host {{ CORE_HOST }}
|
"tinkerd config --hostname {{ HOST_NAME }} --core_host {{ CORE_HOST }}
|
||||||
--token {{ BOOTSTRAP_TOKEN }} --host_id {{ HOST_ID }}"
|
--token {{ BOOTSTRAP_TOKEN }} --host_id {{ HOST_ID }}"
|
||||||
|
|
||||||
- name: Install tinkerd service
|
- name: Install tinkerd service
|
||||||
|
@ -207,4 +215,3 @@
|
||||||
- name: Sync all remote applets
|
- name: Sync all remote applets
|
||||||
ansible.windows.win_shell:
|
ansible.windows.win_shell:
|
||||||
"tinkerd install all"
|
"tinkerd install all"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue