diff --git a/apps/terminal/automations/deploy_applet_host/playbook.yml b/apps/terminal/automations/deploy_applet_host/playbook.yml index 4185f3ba1..98b4f6eb1 100644 --- a/apps/terminal/automations/deploy_applet_host/playbook.yml +++ b/apps/terminal/automations/deploy_applet_host/playbook.yml @@ -7,7 +7,7 @@ HOST_ID: 00000000-0000-0000-0000-000000000000 CORE_HOST: https://demo.jumpserver.org BOOTSTRAP_TOKEN: PleaseChangeMe - RDS_Licensing: true + RDS_Licensing: false RDS_LicenseServer: 127.0.0.1 RDS_LicensingMode: 4 RDS_fSingleSessionPerUser: 1 @@ -16,13 +16,6 @@ TinkerInstaller: Tinker_Installer.exe 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) ansible.windows.win_feature: name: RDS-RD-Server @@ -78,11 +71,23 @@ state: present 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 ansible.windows.win_reboot: post_reboot_delay: 10 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) ansible.windows.win_regedit: @@ -90,6 +95,7 @@ name: LicenseServers data: "{{ RDS_LicenseServer }}" type: string + when: RDS_Licensing - name: Set RDS LicensingMode (regedit) ansible.windows.win_regedit: @@ -97,6 +103,7 @@ name: LicensingMode data: "{{ RDS_LicensingMode }}" type: dword + when: RDS_Licensing - name: Set RDS fSingleSessionPerUser (regedit) ansible.windows.win_regedit: @@ -104,6 +111,7 @@ name: fSingleSessionPerUser data: "{{ RDS_fSingleSessionPerUser }}" type: dword + when: RDS_Licensing - name: Set RDS MaxDisconnectionTime (regedit) ansible.windows.win_regedit: @@ -183,7 +191,7 @@ - name: Generate tinkerd component config 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 }}" - name: Install tinkerd service @@ -207,4 +215,3 @@ - name: Sync all remote applets ansible.windows.win_shell: "tinkerd install all" -