Remove ansible
This commit is contained in:
parent
5625b914bb
commit
d266705655
Binary file not shown.
@ -1,46 +0,0 @@
|
||||
- name: Check {{ app_label }} {{ app_version }} executable checksum
|
||||
vars:
|
||||
app_install_dir: "{{ install_dir }}\\{{ app_label | replace(' ', '_') }}_win64\\{{ app_version }}"
|
||||
register: "exe_checksum_result"
|
||||
ansible.windows.win_stat:
|
||||
path: "{{ app_install_dir}}\\{{ app_exe_rel_path }}"
|
||||
get_checksum: yes
|
||||
checksum_algorithm: sha256
|
||||
|
||||
- name: Download & install {{ app_label }} {{ app_version }}
|
||||
when: exe_checksum_result.stat.exists == false or exe_checksum_result.stat.checksum != app_exe_checksum
|
||||
vars:
|
||||
app_install_dir: "{{ install_dir }}\\{{ app_label | replace(' ', '_') }}_win64\\{{ app_version }}"
|
||||
block:
|
||||
- name: Download {{ app_label }} {{ app_version }}
|
||||
register: app_download_result
|
||||
ansible.windows.win_get_url:
|
||||
url: "{{ app_download_url }}"
|
||||
dest: "{{ download_dir }}"
|
||||
checksum: "{{ app_download_checksum }}"
|
||||
checksum_algorithm: sha256
|
||||
force: false
|
||||
|
||||
- name: Install {{ app_label }} {{ app_version }}
|
||||
ansible.windows.win_command: "{{ install_command }}"
|
||||
vars:
|
||||
loop: "{{ app_install_commands }}"
|
||||
loop_control:
|
||||
loop_var: install_command
|
||||
|
||||
- name: Verify {{ app_label }} {{ app_version }} executable checksum
|
||||
register: exe_checksum_verify_result
|
||||
ansible.windows.win_stat:
|
||||
path: "{{app_install_dir}}\\{{ app_exe_rel_path }}"
|
||||
get_checksum: yes
|
||||
checksum_algorithm: sha256
|
||||
failed_when: exe_checksum_verify_result.stat.exists == false
|
||||
|
||||
- name: Output {{ app_label }} {{ app_version }} executable checksum
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
"{{ exe_checksum_verify_result.stat.path }}"
|
||||
" expect: {{ app_exe_checksum }}"
|
||||
" actual: {{ exe_checksum_verify_result.stat.checksum }}"
|
||||
failed_when: exe_checksum_verify_result.stat.checksum != app_exe_checksum
|
||||
|
@ -1,5 +0,0 @@
|
||||
# ~/Developer/Tools/python_linux64_3.10.5/bin/ansible all -i inventory.yml -m ping -u doylet
|
||||
all:
|
||||
hosts:
|
||||
temp:
|
||||
ansible_host: 172.24.80.1
|
@ -1,272 +0,0 @@
|
||||
# ~/Developer/Tools/python_linux64_3.10.5/bin/ansible-playbook -vv playbook.yml
|
||||
# - No async would be nice and speed things up, *but* it seems to be buggy on
|
||||
# Windows. I get missing a param _async_dir when I try to join on the task?
|
||||
#
|
||||
# But also, we can't use async per import/include task, or even per block, so,
|
||||
# you would have to async all the downloads, wait, then, async all the
|
||||
# installations. If we were downloading from a slow server, that will still
|
||||
# dominate the installation time as we have to join at the end of all the
|
||||
# downloads to proceed onto the next stage.
|
||||
#
|
||||
# - No fancy loops! To reuse tasks (e.g. my install archive task) you must use
|
||||
# include or import. Loops can only be used with includes which is dynamically
|
||||
# evaluated. If you dynamically include tasks then you can not use ansible's
|
||||
# --start-at-task which is very handy for testing ...
|
||||
|
||||
---
|
||||
- hosts: all
|
||||
connection: winrm
|
||||
gather_facts: no
|
||||
|
||||
vars_prompt:
|
||||
- name: ansible_user
|
||||
prompt: Windows username
|
||||
private: false
|
||||
|
||||
- name: ansible_password
|
||||
prompt: Windows password
|
||||
|
||||
vars:
|
||||
backslash_char: '\'
|
||||
|
||||
ansible_connection: winrm
|
||||
ansible_port: 5985
|
||||
ansible_winrm_transport: basic
|
||||
ansible_winrm_server_cert_validation: ignore # Connect over HTTP, not HTTPs, local setup ...
|
||||
|
||||
# The root directory is the playbook directory, but since we are calling
|
||||
# from WSL, the playbook directory is in unix format. We will convert it to
|
||||
# a Windows style-path using some basic text manipulation.
|
||||
#
|
||||
# {{ playbook_dir }} => /mnt/c/Home/Some/Path
|
||||
# [5:] => c/Home/Some/Path
|
||||
# regex_replace(...) => c:/Home/Some/Path
|
||||
# replace('/', '\') => c:\Home\Some\Path
|
||||
#
|
||||
root_dir: "{{ playbook_dir[5:] | regex_replace('^([A-z])/(.*)$', '\\1:/\\2') | replace('/', backslash_char) }}"
|
||||
download_dir: "{{ root_dir }}\\Downloads"
|
||||
internal_dir: "{{ root_dir }}\\Internal"
|
||||
install_dir: "{{ root_dir }}\\Install"
|
||||
zip7_install_dir: "{{ install_dir }}\\7zip_win64\\2201"
|
||||
|
||||
default_unzip_install_command: "{{ zip7_install_dir }}\\7z.exe x {{ app_download_result.dest }} -o{{ app_install_dir }} -aoa -spe"
|
||||
|
||||
default_unzip_install_commands:
|
||||
- "{{ default_unzip_install_command }}"
|
||||
|
||||
default_unzip_remove_dupe_root_install_commands:
|
||||
- "{{ default_unzip_install_command }}"
|
||||
- "xcopy /Y /E /V /H /Q {{ app_install_dir }}\\{{ app_download_filename }}\\* {{ app_install_dir }}"
|
||||
- "cmd /c rmdir /S /Q {{ app_install_dir}}\\{{ app_download_filename }}"
|
||||
|
||||
tasks:
|
||||
- name: Setup root directories
|
||||
ansible.windows.win_file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- "{{ download_dir }}"
|
||||
- "{{ install_dir }}"
|
||||
|
||||
# WezTerm
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: WezTerm
|
||||
app_version: 20221119-145034-49b9839f
|
||||
app_download_checksum: 7041d2c02d226c0c051cc9f6373d51ac9a2de00025e18582077c76e8ad68abe1
|
||||
app_download_filename: WezTerm-windows-{{ app_version }}
|
||||
app_download_url: https://github.com/wez/wezterm/releases/download/{{ app_version }}/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: e3faa247d69a8a966302a2ab4e655b08b79548707db79a7b724cf18cccf5ae35
|
||||
app_exe_rel_path: "wezterm-gui.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
# JetBrains Mono Font
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: JetBrains Mono Font
|
||||
app_version: 2.304
|
||||
app_download_checksum: 6f6376c6ed2960ea8a963cd7387ec9d76e3f629125bc33d1fdcd7eb7012f7bbf
|
||||
app_download_filename: JetBrainsMono-{{ app_version }}
|
||||
app_download_url: https://download.jetbrains.com/fonts/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: a0bf60ef0f83c5ed4d7a75d45838548b1f6873372dfac88f71804491898d138f
|
||||
app_exe_rel_path: "fonts\\ttf\\JetBrainsMono-Regular.ttf"
|
||||
app_install_commands: "{{ default_unzip_install_commands }}"
|
||||
|
||||
# CMake
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: CMake
|
||||
app_version: 3.23.1
|
||||
app_download_checksum: 9b509cc4eb7191dc128cfa3f2170036f9cbc7d9d5f93ff7fafc5b2d77b3b40dc
|
||||
app_download_filename: "cmake-{{ app_version }}-windows-x86_64"
|
||||
app_download_url: https://github.com/Kitware/CMake/releases/download/v{{ app_version }}/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: 326ae6ce4bd46c27f6ce46c95b48efc19848fd9fc24d71d2e8a226dadfef810c
|
||||
app_exe_rel_path: "bin\\cmake.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: CMake
|
||||
app_version: 3.22.2
|
||||
app_download_checksum: 192d62eaecb0600e743f01058dfbd5b6bed91504fe8f56416febf54c38ce096e
|
||||
app_download_filename: "cmake-{{ app_version }}-windows-x86_64"
|
||||
app_download_url: https://github.com/Kitware/CMake/releases/download/v{{ app_version }}/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: cf1af65d22bd01bf1cf2db7ecefeb730ab147549755faa4357e5427e3175f638
|
||||
app_exe_rel_path: "bin\\cmake.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: CMake
|
||||
app_version: 3.10.3
|
||||
app_download_checksum: 3bd57d1cfcf720a4cc72db77bda4c76a7b700fb0341821ad868963ad28856cd0
|
||||
app_download_filename: "cmake-{{ app_version }}-win64-x64"
|
||||
app_download_url: https://github.com/Kitware/CMake/releases/download/v{{ app_version }}/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: f2e3b486d87d2a6bc19b3a62c740028f3f8945875196ac7d3d0e69649e98730a
|
||||
app_exe_rel_path: "bin\\cmake.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
# Doxygen
|
||||
# --------------------------------------------------------------------------
|
||||
- name: Install {{ app_label }} from archive
|
||||
ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
app_label: Doxygen
|
||||
app_version: 1.9.4
|
||||
app_download_checksum: 3b34098c5fb016baa1d29aba101fe9d6843213b966b92a6b12c8856c547ee0c4
|
||||
app_download_filename: doxygen-{{ app_version }}.windows.x64.bin
|
||||
app_download_url: https://github.com/doxygen/doxygen/releases/download/Release_{{ app_version | replace('.', '_') }}/{{ app_download_filename }}.zip
|
||||
app_exe_checksum: 3cb4d89f2b3db7eec2b6797dc6b49cdfe9adda954575898895260f66f312d730
|
||||
app_exe_rel_path: "doxygen.exe"
|
||||
app_install_commands: "{{ default_unzip_install_commands }}"
|
||||
|
||||
# Git
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.import_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: aarch64-none-elf
|
||||
app_label: Git
|
||||
app_version: 2.39.1
|
||||
app_download_checksum: b898306a44084b5fa13b9a52e06408d97234389d07ae41d9409bdf58cad3d227
|
||||
app_download_filename: PortableGit-{{ app_version }}-64-bit.7z.exe
|
||||
app_download_url: https://github.com/git-for-windows/git/releases/download/v{{ app_version }}.windows.1/{{ app_download_filename }}
|
||||
app_exe_checksum: 2fc6d5be237efb6b429d8f40975f1a1cfe3bcac863d9335e24096c8b0ec38105
|
||||
app_exe_rel_path: "cmd\\git.exe"
|
||||
app_install_commands: "{{ default_unzip_install_commands }}"
|
||||
|
||||
# GCC MinGW AArch64
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: aarch64-none-elf
|
||||
app_label: GCC MinGW AArch64
|
||||
app_version: 12.2.0
|
||||
app_download_checksum: 729e8af6aecd85cce63435b94c310c01983091b5db54842cd6604298f29d047f
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: a26baffa86bc3401790d682f13f9b321ea56153eae7dd4f332bde40a6b76fcb3
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: aarch64-none-elf
|
||||
app_label: GCC MinGW AArch64
|
||||
app_version: 11.3.0
|
||||
app_download_checksum: a000bdeeb225145a1450c1b9b1094ef71c13fc4de2ab300a65acbf51cd107c7d
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: 47eaef0e603c9fcae18f2efada305888503e878053119ede3a9e0b8b8beac2ee
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: aarch64-none-elf
|
||||
app_label: GCC MinGW AArch64
|
||||
app_version: 10.3.0
|
||||
app_download_checksum: 095ab5a12059fa5dc59f415c059eb577f443a766eb1dd312fbede0f59940f432
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: f2b2d3c6dab0f84a151835540f25e6d6f9442d00bf546bc4c709fad4b6fdda06
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
# GCC MinGW ARM
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: arm-none-eabi
|
||||
app_label: GCC MinGW ARM
|
||||
app_version: 12.2.0
|
||||
app_download_checksum: aa581b3a5d446bb2d9827f2ea1f02b066b6713d4543d24abbd3181f626036c39
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: fa48985c43cf82b426c461381e4c50d0ac3e9425f7e97bf116e1bab4b3a2a388
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: arm-none-eabi
|
||||
app_label: GCC MinGW ARM
|
||||
app_version: 11.3.0
|
||||
app_download_checksum: 797ed71f60fae386c8875bb4e75e244afb15ded9e00ac77b6670a62be7614cc6
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: a36f2ea6846badf7c91631f118e88967f25d6e479a9beea158445ce75403a655
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
arch: arm-none-eabi
|
||||
app_label: GCC MinGW ARM
|
||||
app_version: 10.3.0
|
||||
app_download_checksum: af0fc2da062aa6423a91213e231ecc5981136b9b0655837ebdbbc5ad879d2d9e
|
||||
app_download_filename: "gcc-v{{ app_version }}-{{ arch }}"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{{ app_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: c3dc49b561d177b3586992dfea86067eb8799e1586a7f26cea5b0ea97926632e
|
||||
app_exe_rel_path: "bin\\{{ arch }}-g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
# GCC MinGW
|
||||
# --------------------------------------------------------------------------
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
mingw_version: 10.0.0
|
||||
app_label: GCC MinGW
|
||||
app_version: 12.2.0
|
||||
app_download_checksum: 5cbe5ea7533f6d24af3a57fe7022032f420b15d7c4e38c0d16534a42d33213a4
|
||||
app_download_filename: "gcc-v{{ app_version }}-mingw-v{{ mingw_version }}-x86_64"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{{ app_version }}-mingw-v{{ mingw_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: 886b0f25256ddbd0f4ad09e6e3b81279f9a8b6a1b5c32c714c9c201d802caa39
|
||||
app_exe_rel_path: "bin\\g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
mingw_version: 10.0.0
|
||||
app_label: GCC MinGW
|
||||
app_version: 11.3.0
|
||||
app_download_checksum: e2c5c64659aeda77680c5eec80bbaa4db3f117b21febeb3f13fd76d580604fd0
|
||||
app_download_filename: "gcc-v{{ app_version }}-mingw-v{{ mingw_version }}-x86_64"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{{ app_version }}-mingw-v{{ mingw_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: e92ecfa0171f2ab0c3ca39f2121ab5e887b3a378399a4be7e056820f5841c7a5
|
||||
app_exe_rel_path: "bin\\g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
||||
|
||||
- ansible.builtin.include_tasks: install_from_archive.yml
|
||||
vars:
|
||||
mingw_version: 8.0.0
|
||||
app_label: GCC MinGW
|
||||
app_version: 10.3.0
|
||||
app_download_checksum: c8f38f6b1d264d7e008009bd32a04ca71b4ee3a3113e67930ab31c2e06818317
|
||||
app_download_filename: "gcc-v{{ app_version }}-mingw-v{{ mingw_version }}-x86_64"
|
||||
app_download_url: https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{{ app_version }}-mingw-v{{ mingw_version }}/{{ app_download_filename }}.7z
|
||||
app_exe_checksum: 5c93b6da129ea01ee5fc87d5c7db948fc3bc62bae261ded9a883f1fa543571d2
|
||||
app_exe_rel_path: "bin\\g++.exe"
|
||||
app_install_commands: "{{ default_unzip_remove_dupe_root_install_commands }}"
|
@ -1,13 +0,0 @@
|
||||
@echo off
|
||||
|
||||
REM Reference
|
||||
REM https://stackoverflow.com/questions/58345011/setup-windows-10-workstation-using-ansible-installed-on-wsl
|
||||
REM https://4sysops.com/wiki/disable-powershell-remoting-disable-psremoting-winrm-listener-firewall-and-localaccounttokenfilterpolicy/
|
||||
|
||||
powershell -Command "Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $false"
|
||||
powershell -Command "Set-Item -Path WSMan:\localhost\Service\AllowUnencrypted -Value $false"
|
||||
powershell -Command "Disable-PSRemoting"
|
||||
|
||||
powershell -Command "Stop-Service WinRM -PassThru"
|
||||
powershell -Command "Set-Service WinRM -StartupType Disabled -PassThru"
|
||||
powershell -Command "Set-NetFirewallRule -DisplayName 'Windows Remote Management (HTTP-In)' -Enabled False -PassThru | Select -Property DisplayName, Profile, Enabled"
|
@ -1,30 +0,0 @@
|
||||
@echo off
|
||||
|
||||
REM Reference
|
||||
REM https://stackoverflow.com/questions/58345011/setup-windows-10-workstation-using-ansible-installed-on-wsl
|
||||
|
||||
set script_dir_backslash=%~dp0
|
||||
set script_dir=%script_dir_backslash:~0,-1%
|
||||
|
||||
REM Disable the virtual adapter for WSL. Virtual adapters for WSL2 are created
|
||||
REM using Hyper-V and are forced to the public profile. PSRemoting can not be
|
||||
REM enabled if there are any adapters with a public profile for security
|
||||
REM reasons. Here we disable the adapter and re-enable it afterwards.
|
||||
powershell -Command "Disable-NetAdapter -Name \"vEthernet (WSL)\" -Confirm:$false"
|
||||
|
||||
REM Enable remote control capabilities
|
||||
powershell -Command "Enable-PSRemoting" || goto :cleanup
|
||||
|
||||
REM Allow basic unencrypted authentication
|
||||
powershell -Command "Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true" || goto :cleanup
|
||||
powershell -Command "Set-Item -Path WSMan:\localhost\Service\AllowUnencrypted -Value $true" || goto :cleanup
|
||||
|
||||
REM Re-enable the adapter after setting up all the options
|
||||
powershell -Command "Enable-NetAdapter -Name \"vEthernet (WSL)\" -Confirm:$false" || goto :cleanup
|
||||
goto :eof
|
||||
|
||||
:cleanup
|
||||
REM Ensure the adapter is re-enabled.
|
||||
powershell -Command "Enable-NetAdapter -Name \"vEthernet (WSL)\" -Confirm:$false" || goto :cleanup
|
||||
call %script_dir%\win_ansible_end_setup.bat
|
||||
|
Loading…
Reference in New Issue
Block a user