From d9ad1aef4888a8a7e04e1d40d2e11fcbb64dd653 Mon Sep 17 00:00:00 2001 From: codedwrench Date: Thu, 9 Nov 2023 11:34:01 +0100 Subject: [PATCH] fix: linting, update versions --- Resources/Ansible_Windows/.ansible-lint | 6 ++ .../base_scripts/configure_msys2_packages.yml | 22 +++--- .../base_scripts/install_boost.yml | 46 +++++++----- .../base_scripts/install_msys2.yml | 6 +- .../base_scripts/install_pdcurses.yml | 40 ++++++----- .../base_scripts/install_wpcapdll.yml | 20 +++--- Resources/Ansible_Windows/install.yml | 23 +++--- Resources/Ansible_Windows/install_base.yml | 58 +++++++-------- Resources/Ansible_Windows/install_devenv.yml | 20 +++--- Resources/Ansible_Windows/install_runner.yml | 71 +++++++++---------- Resources/Ansible_Windows/vars.yml | 8 +-- Resources/Docker/release-runner.Dockerfile | 6 +- 12 files changed, 170 insertions(+), 156 deletions(-) create mode 100644 Resources/Ansible_Windows/.ansible-lint diff --git a/Resources/Ansible_Windows/.ansible-lint b/Resources/Ansible_Windows/.ansible-lint new file mode 100644 index 0000000..a989068 --- /dev/null +++ b/Resources/Ansible_Windows/.ansible-lint @@ -0,0 +1,6 @@ +--- +# .ansible-lint + +profile: shared # min, basic, moderate,safety, shared, production +enable_list: + - fqcn \ No newline at end of file diff --git a/Resources/Ansible_Windows/base_scripts/configure_msys2_packages.yml b/Resources/Ansible_Windows/base_scripts/configure_msys2_packages.yml index f3805e7..e94533b 100644 --- a/Resources/Ansible_Windows/base_scripts/configure_msys2_packages.yml +++ b/Resources/Ansible_Windows/base_scripts/configure_msys2_packages.yml @@ -1,35 +1,35 @@ --- - name: Check already installed packages file exists - win_stat: - path: '{{ drive }}:\msys64\packages.txt' + ansible.windows.win_stat: + path: "{{ drive }}:\\msys64\\packages.txt" register: packages_exist - name: Get pacman installed list - win_shell: 'type {{ drive }}:\msys64\packages.txt' + ansible.windows.win_shell: type {{ drive }}:\msys64\packages.txt register: installed_packages changed_when: false when: packages_exist.stat.exists - name: Compare expected to be installed with installed packages - set_fact: - should_setup_msys2: True + ansible.builtin.set_fact: + should_setup_msys2: true when: (not packages_exist.stat.exists) or (item not in installed_packages.stdout_lines) loop: "{{ msys2_packages }}" - name: Setup MSYS2 - win_shell: - '{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -c ''pacman -Syu - --needed --noconfirm {{ msys2_packages | join('' '') }} && - pacman -Qe | cut -d '''' '''' -f 1 > /{{ drive }}/msys64/packages.txt''' + ansible.windows.win_shell: > + {{ drive }}:\\msys64\\msys2_shell.cmd -mingw32 -defterm -no-start -c + 'pacman -Syu --needed --noconfirm {{ msys2_packages | join(' ') }} && + pacman -Qe | cut -d '' '' -f 1 > /{{ drive }}/msys64/packages.txt' when: should_setup_msys2 is defined - name: Get pacman installed list - win_shell: 'type {{ drive }}:\msys64\packages.txt' + ansible.windows.win_shell: type {{ drive }}:\msys64\packages.txt changed_when: false register: installed_packages - name: Verify pacman result - fail: + ansible.builtin.fail: msg: "{{ item }} not installed" failed_when: item not in installed_packages.stdout_lines loop: "{{ msys2_packages }}" diff --git a/Resources/Ansible_Windows/base_scripts/install_boost.yml b/Resources/Ansible_Windows/base_scripts/install_boost.yml index a2d3c7f..19e846f 100644 --- a/Resources/Ansible_Windows/base_scripts/install_boost.yml +++ b/Resources/Ansible_Windows/base_scripts/install_boost.yml @@ -1,38 +1,48 @@ --- - name: Download Boost - win_get_url: - dest: '{{ drive }}:\{{ install_dir}}\boost.zip' - url: 'https://boostorg.jfrog.io/artifactory/main/release/{{ boost_version }}/source/boost_{{ boost_version.split(".")[0] }}_{{ boost_version.split(".")[1] }}_{{ boost_version.split(".")[2] }}.zip' + ansible.windows.win_get_url: + dest: "{{ drive }}:\\{{ install_dir }}\\boost.zip" + url: >- + https://boostorg.jfrog.io/artifactory/main/release/{{ boost_version }}/source/ + boost_{{ boost_version.split(".")[0] }}_{{ boost_version.split(".")[1] }}_{{ boost_version.split(".")[2] }}.zip register: boost_download_result - name: Unzip Boost - win_unzip: - delete_archive: yes - src: '{{ drive }}:\{{ install_dir}}\boost.zip' - dest: '{{ drive }}:\{{ install_dir}}' + community.windows.win_unzip: + delete_archive: true + src: "{{ drive }}:\\{{ install_dir }}\\boost.zip" + dest: "{{ drive }}:\\{{ install_dir }}" when: boost_download_result.msg is defined and boost_download_result.msg == "OK" - name: Rename Boost - win_shell: "move boost* boost" + ansible.windows.win_shell: move boost* boost args: - chdir: '{{ drive }}:\{{ install_dir }}' + chdir: "{{ drive }}:\\{{ install_dir }}" when: boost_download_result.msg is defined and boost_download_result.msg == "OK" - name: Build Boost - win_shell: + ansible.windows.win_shell: > '{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c "cd tools/build && ./bootstrap.bat mingw && cp b2 ../.. && cd ../.. && - ./tools/build/b2.exe --build-type=minimal --toolset=gcc variant=release link=static runtime-link=static - address-model=32 threading=multi --with-system --with-program_options stage"' + ./tools/build/b2.exe --build-type=minimal --toolset=gcc variant=release link=static + runtime-link=static address-model=32 threading=multi --with-system --with-program_options stage"' args: - chdir: '{{ drive }}:\{{ install_dir }}\boost' + chdir: "{{ drive }}:\\{{ install_dir }}\\boost" register: boost_build_output when: boost_download_result.msg is defined and boost_download_result.msg == "OK" - name: Log output to file - local_action: copy content={{ boost_build_output.stdout }} dest=./boost_output.log - when: boost_build_output.stdout - + ansible.builtin.copy: + content: "{{ boost_build_output.stdout }}" + dest: ./boost_output.log + mode: "0644" + delegate_to: localhost + when: boost_build_output.stdout + - name: Log error output to file - local_action: copy content={{ boost_build_output.stderr }} dest=./boost_error_output.log - when: boost_build_output.stderr \ No newline at end of file + ansible.builtin.copy: + content: "{{ boost_build_output.stderr }}" + dest: ./boost_error_output.log + mode: "0644" + delegate_to: localhost + when: boost_build_output.stderr diff --git a/Resources/Ansible_Windows/base_scripts/install_msys2.yml b/Resources/Ansible_Windows/base_scripts/install_msys2.yml index 7739c52..4585255 100644 --- a/Resources/Ansible_Windows/base_scripts/install_msys2.yml +++ b/Resources/Ansible_Windows/base_scripts/install_msys2.yml @@ -1,9 +1,9 @@ --- - name: Install MSYS2, Due to github-actions being dumb this has to be on the root of the drive - win_chocolatey: + chocolatey.chocolatey.win_chocolatey: name: msys2 - package_params: '/InstallDir="{{ drive }}:\msys64"' + package_params: /InstallDir="{{ drive }}:\msys64" state: present - name: Configure packages - import_tasks: configure_msys2_packages.yml \ No newline at end of file + ansible.builtin.import_tasks: configure_msys2_packages.yml diff --git a/Resources/Ansible_Windows/base_scripts/install_pdcurses.yml b/Resources/Ansible_Windows/base_scripts/install_pdcurses.yml index 4f158b5..45158ad 100644 --- a/Resources/Ansible_Windows/base_scripts/install_pdcurses.yml +++ b/Resources/Ansible_Windows/base_scripts/install_pdcurses.yml @@ -1,36 +1,42 @@ --- - name: Download PDCurses - win_get_url: - dest: '{{ drive }}:\{{ install_dir}}\pdcurses.zip' - url: "https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v{{ pdcurses_version }}.zip" + ansible.windows.win_get_url: + dest: "{{ drive }}:\\{{ install_dir }}\\pdcurses.zip" + url: https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v{{ pdcurses_version }}.zip register: pdcurses_download_result - name: Unzip PDCurses - win_unzip: - delete_archive: yes - src: '{{ drive }}:\{{ install_dir}}\pdcurses.zip' - dest: '{{ drive }}:\{{ install_dir}}' + community.windows.win_unzip: + delete_archive: true + src: "{{ drive }}:\\{{ install_dir }}\\pdcurses.zip" + dest: "{{ drive }}:\\{{ install_dir }}" when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" - name: Rename PDCurses - win_shell: "move PDCurses* pdcurses" + ansible.windows.win_shell: move PDCurses* pdcurses args: - chdir: '{{ drive }}:\{{ install_dir }}' + chdir: "{{ drive }}:\\{{ install_dir }}" when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" - name: Build PDCurses - win_shell: - '{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c - "mingw32-make WIDE=Y CHTYPE_32=Y -j4" ' + ansible.windows.win_shell: '{{ drive }}:\msys64\msys2_shell.cmd -mingw32 -defterm -no-start -here -c "mingw32-make WIDE=Y CHTYPE_32=Y -j4" ' args: - chdir: '{{ drive }}:\{{ install_dir }}\pdcurses\wincon' + chdir: "{{ drive }}:\\{{ install_dir }}\\pdcurses\\wincon" register: pdcurses_build_output when: pdcurses_download_result.msg is defined and pdcurses_download_result.msg == "OK" - name: Log output to file - local_action: copy content={{ pdcurses_build_output.stdout }} dest=./pdcurses_output.log - when: pdcurses_build_output.stdout + ansible.builtin.copy: + content: "{{ pdcurses_build_output.stdout }}" + dest: ./pdcurses_output.log + mode: "0644" + delegate_to: localhost + when: pdcurses_build_output.stdout - name: Log error output to file - local_action: copy content={{ pdcurses_build_output.stderr }} dest=./pdcurses_error_output.log - when: pdcurses_build_output.stderr \ No newline at end of file + ansible.builtin.copy: + content: "{{ pdcurses_build_output.stderr }}" + dest: ./pdcurses_error_output.log + mode: "0644" + delegate_to: localhost + when: pdcurses_build_output.stderr diff --git a/Resources/Ansible_Windows/base_scripts/install_wpcapdll.yml b/Resources/Ansible_Windows/base_scripts/install_wpcapdll.yml index 9226d95..ea93346 100644 --- a/Resources/Ansible_Windows/base_scripts/install_wpcapdll.yml +++ b/Resources/Ansible_Windows/base_scripts/install_wpcapdll.yml @@ -3,27 +3,27 @@ # Leaving the installer so it can be installed manually for testing the xlha executable afterwards. - name: Download NPCAP Installer - win_get_url: - dest: '{{ drive }}:\{{ install_dir}}\npcap.exe' - url: "https://npcap.com/dist/npcap-{{ npcap_version }}.exe" + ansible.windows.win_get_url: + dest: "{{ drive }}:\\{{ install_dir }}\\npcap.exe" + url: https://npcap.com/dist/npcap-{{ npcap_version }}.exe register: npcapsdk_download_result - name: Grab wpcap.dll, the installer does not allow for silent install so we are going to mess with it. - win_shell: '7z x npcap.exe -oNPcap -aoa' + ansible.windows.win_shell: 7z x npcap.exe -oNPcap -aoa args: - chdir: '{{ drive }}:\{{ install_dir }}' + chdir: "{{ drive }}:\\{{ install_dir }}" register: extract_npcap_result when: (npcapsdk_download_result.msg is defined) and (npcapsdk_download_result.msg == "OK") - name: Copy wpcap.dll win_copy: - dest: '{{ drive }}:\\{{ install_dir }}\npcapsdk\wpcap.dll' + dest: "{{ drive }}:\\\\{{ install_dir }}\\npcapsdk\\wpcap.dll" operation: file_copy - remote_src: yes - src: '{{ drive }}:\{{ install_dir }}\Npcap\wpcap.dll' + remote_src: true + src: "{{ drive }}:\\{{ install_dir }}\\Npcap\\wpcap.dll" when: (npcapsdk_download_result.msg is defined) and (npcapsdk_download_result.msg == "OK") - name: Remove NPCAP dir win_file: - path: '{{ drive }}:\{{ install_dir }}\NPcap' - state: absent \ No newline at end of file + path: "{{ drive }}:\\{{ install_dir }}\\NPcap" + state: absent diff --git a/Resources/Ansible_Windows/install.yml b/Resources/Ansible_Windows/install.yml index 67b92a8..8c96c36 100644 --- a/Resources/Ansible_Windows/install.yml +++ b/Resources/Ansible_Windows/install.yml @@ -1,21 +1,20 @@ --- - name: Installing XLink Handheld Assistant build environment hosts: win - + tasks: - - name: Grab variables - include_vars: + - name: Grab variables + ansible.builtin.include_vars: file: vars.yml - name: Install Base - import_tasks: install_base.yml - when: install_base == True - + ansible.builtin.import_tasks: install_base.yml + when: install_base + - name: Install Runner - import_tasks: install_runner.yml - when: install_runner == True - - - name: Install Development Environment - import_tasks: install_devenv.yml - when: install_devenv == True + ansible.builtin.import_tasks: install_runner.yml + when: install_runner + - name: Install Development Environment + ansible.builtin.import_tasks: install_devenv.yml + when: install_devenv diff --git a/Resources/Ansible_Windows/install_base.yml b/Resources/Ansible_Windows/install_base.yml index 4d16544..bc8ccce 100644 --- a/Resources/Ansible_Windows/install_base.yml +++ b/Resources/Ansible_Windows/install_base.yml @@ -3,19 +3,19 @@ # One way to ensure the system is reliable just after a reboot, is to set WinRM to a delayed startup - name: Ensure WinRM starts when the system has settled and is ready to work reliably - win_service: + ansible.windows.win_service: name: WinRM start_mode: delayed # Make sure system is up-to-date, do this 3 times because windows is windows and likes to magically come up with # updates - name: Install all security, critical, and rollup updates - win_updates: + ansible.windows.win_updates: category_names: - SecurityUpdates - CriticalUpdates - UpdateRollups - reboot: yes + reboot: true reboot_timeout: 3600 register: update_result when: update_result is not defined or not update_result.found_update_count == 0 @@ -23,25 +23,25 @@ # -- Installing base -- -# Sadly thes packages have no way to install it to a different location +# Sadly these packages have no way to install it to a different location - name: Install 7-Zip - win_chocolatey: + chocolatey.chocolatey.win_chocolatey: name: 7zip state: present - name: Install Git - win_chocolatey: + chocolatey.chocolatey.win_chocolatey: name: git state: present - name: Ensure ssh folder exists - win_file: + ansible.windows.win_file: path: "{{ ssh_key_location }}" state: directory - name: Copy server private key - win_copy: - dest: '{{ ssh_key_location }}\id_rsa' + ansible.windows.win_copy: + dest: "{{ ssh_key_location }}\\id_rsa" operation: file_copy src: id_rsa.vault @@ -49,8 +49,8 @@ import_tasks: base_scripts/install_msys2.yml - name: Ensure install_dir exists - win_file: - path: '{{ drive }}:\{{ install_dir }}' + ansible.windows.win_file: + path: "{{ drive }}:\\{{ install_dir }}" state: directory # -- Static libs -- @@ -58,49 +58,49 @@ # SDK # TODO: Probably should do a version check at some point instead - name: Check if NPCAP SDK is installed - win_stat: - path: '{{ drive }}:\{{ install_dir }}\npcapsdk' + ansible.windows.win_stat: + path: "{{ drive }}:\\{{ install_dir }}\\npcapsdk" register: npcap_sdk_exists - name: Download NPCAP SDK - win_get_url: - dest: '{{ drive }}:\{{ install_dir}}\npcapsdk.zip' - url: "https://npcap.com/dist/npcap-sdk-{{ npcapsdk_version }}.zip" + ansible.windows.win_get_url: + dest: "{{ drive }}:\\{{ install_dir }}\\npcapsdk.zip" + url: https://npcap.com/dist/npcap-sdk-{{ npcapsdk_version }}.zip register: npcapsdk_download_result when: (npcap_sdk_exists is defined) and (not npcap_sdk_exists.stat.exists) - name: Unzip NPCAP SDK - win_unzip: - delete_archive: yes - src: '{{ drive }}:\{{ install_dir}}\npcapsdk.zip' - dest: '{{ drive }}:\{{ install_dir}}\npcapsdk' + community.windows.win_unzip: + delete_archive: true + src: "{{ drive }}:\\{{ install_dir }}\\npcapsdk.zip" + dest: "{{ drive }}:\\{{ install_dir }}\\npcapsdk" when: npcapsdk_download_result.msg is defined and npcapsdk_download_result.msg == "OK" - name: Check if wpcap.dll exists - win_stat: - path: '{{ drive }}:\{{ install_dir }}\npcapsdk\wpcap.dll' + ansible.windows.win_stat: + path: "{{ drive }}:\\{{ install_dir }}\\npcapsdk\\wpcap.dll" register: npcap_dll_exists - name: Install wpcap.dll - import_tasks: base_scripts/install_wpcapdll.yml + ansible.builtin.import_tasks: base_scripts/install_wpcapdll.yml when: (npcap_dll_exists.stat.exists is defined) and (not npcap_dll_exists.stat.exists) # TODO: Probably should do a version check at some point instead - name: Check if PDCurses is installed - win_stat: - path: '{{ drive }}:\{{ install_dir }}\pdcurses' + ansible.windows.win_stat: + path: "{{ drive }}:\\{{ install_dir }}\\pdcurses" register: pdcurses_exists - name: Install PDCurses - import_tasks: base_scripts/install_pdcurses.yml + ansible.builtin.import_tasks: base_scripts/install_pdcurses.yml when: (pdcurses_exists.stat is defined) and (not pdcurses_exists.stat.exists) # TODO: Probably should do a version check at some point instead - name: Check if Boost is installed - win_stat: - path: '{{ drive }}:\{{ install_dir }}\boost' + ansible.windows.win_stat: + path: "{{ drive }}:\\{{ install_dir }}\\boost" register: boost_exists - name: Install Boost - import_tasks: base_scripts/install_boost.yml + ansible.builtin.import_tasks: base_scripts/install_boost.yml when: (boost_exists.stat is defined) and (not boost_exists.stat.exists) diff --git a/Resources/Ansible_Windows/install_devenv.yml b/Resources/Ansible_Windows/install_devenv.yml index fd4ae8d..d7c917c 100644 --- a/Resources/Ansible_Windows/install_devenv.yml +++ b/Resources/Ansible_Windows/install_devenv.yml @@ -1,30 +1,30 @@ --- - name: Install extra MSYS dependencies - include_tasks: base_scripts/configure_msys2_packages.yml + ansible.builtin.include_tasks: base_scripts/configure_msys2_packages.yml vars: msys2_packages: "{{ msys2_devenv_packages }}" - name: Install VSCode - win_chocolatey: + chocolatey.chocolatey.win_chocolatey: name: vscode state: present - name: Install VSCode Extensions for the current user - win_shell: "code --install-extension {{ item }}" + ansible.windows.win_shell: code --install-extension {{ item }} loop: "{{ devenv_vscode_packages }}" register: install_output - become_method: runas - become: yes + become_method: ansible.builtin.runas + become: true become_user: "{{ user }}" changed_when: '"successfully installed" in install_output.stdout' failed_when: '"Failed Installing" in install_output.stderr' # Default settings.jsons - name: Copy vscode settings.json - win_copy: - dest: '%APPDATA%\Code\User\settings.json' + ansible.windows.win_copy: + dest: "%APPDATA%\\Code\\User\\settings.json" operation: file_copy src: files/settings.json - become_method: runas - become: yes - become_user: "{{ user }}" \ No newline at end of file + become_method: ansible.builtin.runas + become: true + become_user: "{{ user }}" diff --git a/Resources/Ansible_Windows/install_runner.yml b/Resources/Ansible_Windows/install_runner.yml index 3fbc544..fbda1bc 100644 --- a/Resources/Ansible_Windows/install_runner.yml +++ b/Resources/Ansible_Windows/install_runner.yml @@ -2,66 +2,61 @@ # NOTE: inspired by https://github.com/MonolithProjects/ansible-github_actions_runner - name: Grab the runner version - win_uri: - url: "https://api.github.com/repos/actions/runner/releases/latest" + ansible.windows.win_uri: + url: https://api.github.com/repos/actions/runner/releases/latest headers: - Content-Type: "application/json" + Content-Type: application/json method: GET - return_content: yes + return_content: true register: version_response - name: Set runner_version variable - set_fact: + ansible.builtin.set_fact: runner_version: "{{ version_response.json.tag_name | regex_replace('^v', '') }}" -- name: "Check already installed" - win_stat: - path: '{{ drive }}:\{{ install_dir }}\{{ runner_folder }}\version.txt' +- name: Check already installed + ansible.windows.win_stat: + path: "{{ drive }}:\\{{ install_dir }}\\{{ runner_folder }}\\version.txt" register: stat_version -- name: "Check right version installed" - win_shell: 'Select-String -Path "{{ drive }}:\{{ install_dir }}\{{ runner_folder }}\version.txt" -Pattern "{{ runner_version }}"' - when: stat_version.stat.exists == True +- name: Check right version installed + ansible.windows.win_shell: Select-String -Path "{{ drive }}:\{{ install_dir }}\{{ runner_folder }}\version.txt" -Pattern "{{ runner_version }}" + when: stat_version.stat.exists changed_when: false register: installed_packages -- name: "Download the runner" - win_get_url: - dest: '{{ drive }}:\{{ install_dir }}\runner.zip' - url: "https://github.com/actions/runner/releases/download/v{{ runner_version }}/actions-runner-win-x64-{{ runner_version }}.zip" - when: (stat_version.stat.exists == False) or (installed_packages.stdout is defined and installed_packages.stdout == "") +- name: Download the runner + ansible.windows.win_get_url: + dest: "{{ drive }}:\\{{ install_dir }}\\runner.zip" + url: https://github.com/actions/runner/releases/download/v{{ runner_version }}/actions-runner-win-x64-{{ runner_version }}.zip + when: (stat_version.stat.exists) or (installed_packages.stdout is defined and installed_packages.stdout == "") register: runner_download_result - name: Unzip Runner - win_unzip: - delete_archive: yes - src: '{{ drive }}:\{{ install_dir }}\runner.zip' - dest: '{{ drive }}:\{{ install_dir }}\{{ runner_folder }}' + community.windows.win_unzip: + delete_archive: true + src: "{{ drive }}:\\{{ install_dir }}\\runner.zip" + dest: "{{ drive }}:\\{{ install_dir }}\\{{ runner_folder }}" when: runner_download_result.msg is defined and runner_download_result.msg == "OK" - name: Register runner - win_shell: '{{ drive }}:\{{ install_dir }}\{{ runner_folder }}\config.cmd \ - --url https://github.com/{{ runner_github_user }}/{{ runner_github_repo }} \ - --token {{ runner_token }} \ - --name {{ runner_name }} \ - --labels "self-windows" \ - --unattended \ - --runasservice \ - --windowslogonaccount {{ user }} \ - --windowslogonpassword {{ runner_admin_password }}' + ansible.windows.win_shell: > + {{ drive }}:\{{ install_dir }}\{{ runner_folder }}\config.cmd \ --url https://github.com/{{ runner_github_user }}/{{ runner_github_repo }} --token + {{ runner_token }} --name {{ runner_name }} --labels "self-windows" --unattended --runasservice --windowslogonaccount {{ user }} --windowslogonpassword + {{ runner_admin_password }} args: - chdir: '{{ drive }}:\{{ install_dir }}\{{ runner_folder }}' - become: yes + chdir: "{{ drive }}:\\{{ install_dir }}\\{{ runner_folder }}" + become: true become_user: "{{ user }}" - become_method: runas + become_method: ansible.builtin.runas register: register_output - when: (stat_version.stat.exists == False) and (runner_download_result.msg is defined and runner_download_result.msg == "OK") + when: (stat_version.stat.exists) and (runner_download_result.msg is defined and runner_download_result.msg == "OK") - name: Set version, only if registration went through, so this script can be called multiple times - win_lineinfile: - path: '{{ drive }}:\{{ install_dir }}\{{ runner_folder }}\version.txt' - regex: '\d*\.\d*\.\d*' + community.windows.win_lineinfile: + path: "{{ drive }}:\\{{ install_dir }}\\{{ runner_folder }}\\version.txt" + regex: \d*\.\d*\.\d* line: "{{ runner_version }}" state: present - create: yes - when: (stat_version.stat.exists == True) or (register_output.rc is defined and register_output.rc == 0) \ No newline at end of file + create: true + when: (stat_version.stat.exists) or (register_output.rc is defined and register_output.rc == 0) diff --git a/Resources/Ansible_Windows/vars.yml b/Resources/Ansible_Windows/vars.yml index c6c7691..6b70286 100644 --- a/Resources/Ansible_Windows/vars.yml +++ b/Resources/Ansible_Windows/vars.yml @@ -32,9 +32,9 @@ devenv_vscode_packages: ] npcapsdk_version: "1.13" -npcap_version: "1.31" -pdcurses_version: "4.3.6" -boost_version: "1.82.0" +npcap_version: "1.60" +pdcurses_version: "4.3.7" +boost_version: "1.83.0" install_base: true install_runner: false @@ -49,5 +49,3 @@ runner_github_repo: "xlinkhandheldassistant" # Add these variables using command line, vaulting these would be smart runner_token: "{{ token }}" runner_admin_password: "{{ password }}" - - diff --git a/Resources/Docker/release-runner.Dockerfile b/Resources/Docker/release-runner.Dockerfile index f37ef2b..f281212 100644 --- a/Resources/Docker/release-runner.Dockerfile +++ b/Resources/Docker/release-runner.Dockerfile @@ -3,7 +3,7 @@ FROM debian:stable ENV RUNNER_USER=runner ENV BOOST_VER_MAJOR=1 -ENV BOOST_VER_MINOR=82 +ENV BOOST_VER_MINOR=83 ENV BOOST_VER_PATCH=0 ENV CURSES_VER_MAJOR=6 @@ -14,11 +14,11 @@ ENV LIBPCAP_VER_MINOR=10 ENV LIBPCAP_VER_PATCH=4 ENV LIBNL_VER_MAJOR=3 -ENV LIBNL_VER_MINOR=7 +ENV LIBNL_VER_MINOR=8 ENV LIBNL_VER_PATCH=0 ENV GOOGLETEST_VER_MAJOR=1 -ENV GOOGLETEST_VER_MINOR=13 +ENV GOOGLETEST_VER_MINOR=14 ENV GOOGLETEST_VER_PATCH=0 RUN \