perf: 更新 tinker python 版本

pull/11944/head
吴小白 2023-10-24 08:46:17 +08:00
parent b04c7f022f
commit de7d7b41c0
1 changed files with 29 additions and 10 deletions

View File

@ -65,16 +65,15 @@
- '%USERPROFILE%\AppData\Local\Programs\Tinker\'
scope: user
- name: Download python-3.10.11
- name: Download python-3.11.6
ansible.windows.win_get_url:
url: "{{ APPLET_DOWNLOAD_HOST }}/download/applets/python-3.10.11-amd64.exe"
dest: "{{ ansible_env.TEMP }}\\python-3.10.11-amd64.exe"
url: "{{ APPLET_DOWNLOAD_HOST }}/download/applets/python-3.11.6-amd64.exe"
dest: "{{ ansible_env.TEMP }}\\python-3.11.6-amd64.exe"
validate_certs: "{{ not IGNORE_VERIFY_CERTS }}"
- name: Install the python-3.10.11
- name: Install the python-3.11.6
ansible.windows.win_package:
path: "{{ ansible_env.TEMP }}\\python-3.10.11-amd64.exe"
product_id: '{371d0d73-d418-4ffe-b280-58c3e7987525}'
path: "{{ ansible_env.TEMP }}\\python-3.11.6-amd64.exe"
arguments:
- /quiet
- InstallAllUsers=1
@ -157,16 +156,36 @@
script: |
pip install -r '{{ ansible_env.TEMP }}\pip_packages\pip_packages\requirements.txt' --no-index --find-links='{{ ansible_env.TEMP }}\pip_packages\pip_packages'
- name: Stop chromedriver before install (jumpserver)
ansible.windows.win_powershell:
script: |
if (Get-Process -Name 'chromedriver' -ErrorAction SilentlyContinue) {
TASKKILL /F /IM chromedriver.exe /T
}
else {
$Ansible.Changed = $false
}
- name: Download chromedriver (Chrome)
ansible.windows.win_get_url:
url: "{{ APPLET_DOWNLOAD_HOST }}/download/applets/chromedriver_win32.zip"
dest: "{{ ansible_env.TEMP }}\\chromedriver_win32.zip"
dest: "{{ ansible_env.TEMP }}\\chromedriver-win32.zip"
validate_certs: "{{ not IGNORE_VERIFY_CERTS }}"
- name: Unzip chromedriver (Chrome)
community.windows.win_unzip:
src: "{{ ansible_env.TEMP }}\\chromedriver_win32.zip"
dest: C:\Program Files\JumpServer\drivers\chromedriver_win32
src: "{{ ansible_env.TEMP }}\\chromedriver-win32.zip"
dest: C:\Program Files\JumpServer\drivers\chromedriver-win32
- name: Stop Chrome before install (jumpserver)
ansible.windows.win_powershell:
script: |
if (Get-Process -Name 'chrome' -ErrorAction SilentlyContinue) {
TASKKILL /F /IM chrome.exe /T
}
else {
$Ansible.Changed = $false
}
- name: Download Chrome zip package (Chrome)
ansible.windows.win_get_url:
@ -191,7 +210,7 @@
ansible.windows.win_path:
elements:
- 'C:\Program Files\JumpServer\applications\Chrome\Application'
- 'C:\Program Files\JumpServer\drivers\chromedriver_win32'
- 'C:\Program Files\JumpServer\drivers\chromedriver-win32'
- name: Set Chrome variables disable Google Api (Chrome)
ansible.windows.win_environment: