From 5ad66656c30e5e4826b2e968251ab1e3770034b2 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 23 Jul 2025 17:17:38 -0700 Subject: [PATCH] Replace FreeBSD 13.3 with FreeBSD 13.5 (#85534) * ansible-test - Replace FreeBSD 13.3 with 13.4 (#84236) * ansible-test - Replace FreeBSD 13.3 with 13.4 * ansible-test - Fix typos in bootstrap.sh * Skip libfaketime on FreeBSD except FreeBSD 14 (cherry picked from commit a98801903df4a9a3af65ad917e96fc4f3e3437a6) * ansible-test - Replace FreeBSD 13.4 with 13.5 (#84812) (cherry picked from commit 4efb01c2f3dd17a18cd79a04d584633751b8a537) * ansible-test - Use OS packages on FreeBSD 13.5 (#85530) (cherry picked from commit cdb7af094bcd293b49ac2ff7cc03bc867b2e07d0) --- .azure-pipelines/azure-pipelines.yml | 8 +++---- .../ansible-test-freebsd-bootstrap.yml | 2 ++ changelogs/fragments/ansible-test-remotes.yml | 2 ++ .../targets/cron/defaults/main.yml | 1 - .../targets/setup_cron/defaults/main.yml | 1 + .../targets/setup_cron/tasks/main.yml | 1 + .../targets/setup_cron/vars/freebsd-14.yml | 4 ++++ .../targets/setup_cron/vars/freebsd.yml | 1 + .../ansible_test/_data/completion/remote.txt | 2 +- .../_util/target/setup/bootstrap.sh | 22 ++++++------------- 10 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 changelogs/fragments/ansible-test-freebsd-bootstrap.yml create mode 100644 changelogs/fragments/ansible-test-remotes.yml delete mode 100644 test/integration/targets/cron/defaults/main.yml create mode 100644 test/integration/targets/setup_cron/vars/freebsd-14.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index cb3eb8c2368..3a375a55d3c 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -85,8 +85,8 @@ stages: test: rhel/9.3@3.11 - name: RHEL 10.0 test: rhel/10.0 - - name: FreeBSD 13.3 - test: freebsd/13.3 + - name: FreeBSD 13.5 + test: freebsd/13.5 - name: FreeBSD 14.1 test: freebsd/14.1 groups: @@ -101,8 +101,8 @@ stages: test: rhel/9.3 - name: RHEL 10.0 test: rhel/10.0 - - name: FreeBSD 13.3 - test: freebsd/13.3 + - name: FreeBSD 13.5 + test: freebsd/13.5 - name: FreeBSD 14.1 test: freebsd/14.1 groups: diff --git a/changelogs/fragments/ansible-test-freebsd-bootstrap.yml b/changelogs/fragments/ansible-test-freebsd-bootstrap.yml new file mode 100644 index 00000000000..39a6cc61d7d --- /dev/null +++ b/changelogs/fragments/ansible-test-freebsd-bootstrap.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Use OS packages to satisfy controller requirements on FreeBSD 13.5 during managed instance bootstrapping. diff --git a/changelogs/fragments/ansible-test-remotes.yml b/changelogs/fragments/ansible-test-remotes.yml new file mode 100644 index 00000000000..80fe0fc91c7 --- /dev/null +++ b/changelogs/fragments/ansible-test-remotes.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Replace remote FreeBSD 13.3 with 13.5. diff --git a/test/integration/targets/cron/defaults/main.yml b/test/integration/targets/cron/defaults/main.yml deleted file mode 100644 index 37e6fc3714c..00000000000 --- a/test/integration/targets/cron/defaults/main.yml +++ /dev/null @@ -1 +0,0 @@ -faketime_pkg: libfaketime diff --git a/test/integration/targets/setup_cron/defaults/main.yml b/test/integration/targets/setup_cron/defaults/main.yml index a6d1965fd26..1a13ad26761 100644 --- a/test/integration/targets/setup_cron/defaults/main.yml +++ b/test/integration/targets/setup_cron/defaults/main.yml @@ -1 +1,2 @@ remote_dir: "{{ remote_tmp_dir }}" +faketime_pkg: libfaketime diff --git a/test/integration/targets/setup_cron/tasks/main.yml b/test/integration/targets/setup_cron/tasks/main.yml index 73cce2a2661..90f3085df15 100644 --- a/test/integration/targets/setup_cron/tasks/main.yml +++ b/test/integration/targets/setup_cron/tasks/main.yml @@ -7,6 +7,7 @@ vars: search: files: + - '{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml' - '{{ ansible_distribution | lower }}.yml' - '{{ ansible_os_family | lower }}.yml' - '{{ ansible_system | lower }}.yml' diff --git a/test/integration/targets/setup_cron/vars/freebsd-14.yml b/test/integration/targets/setup_cron/vars/freebsd-14.yml new file mode 100644 index 00000000000..21d84a3c81e --- /dev/null +++ b/test/integration/targets/setup_cron/vars/freebsd-14.yml @@ -0,0 +1,4 @@ +cron_pkg: +cron_service: cron +list_pkg_files: pkg info --list-files +faketime_pkg: libfaketime diff --git a/test/integration/targets/setup_cron/vars/freebsd.yml b/test/integration/targets/setup_cron/vars/freebsd.yml index 41ed4493959..80c1fd28e2e 100644 --- a/test/integration/targets/setup_cron/vars/freebsd.yml +++ b/test/integration/targets/setup_cron/vars/freebsd.yml @@ -1,3 +1,4 @@ cron_pkg: cron_service: cron list_pkg_files: pkg info --list-files +faketime_pkg: ~ diff --git a/test/lib/ansible_test/_data/completion/remote.txt b/test/lib/ansible_test/_data/completion/remote.txt index dcf6a892db3..9dfdb1b74cf 100644 --- a/test/lib/ansible_test/_data/completion/remote.txt +++ b/test/lib/ansible_test/_data/completion/remote.txt @@ -2,7 +2,7 @@ alpine/3.19 python=3.11 become=doas_sudo provider=aws arch=x86_64 alpine become=doas_sudo provider=aws arch=x86_64 fedora/39 python=3.12 become=sudo provider=aws arch=x86_64 fedora become=sudo provider=aws arch=x86_64 -freebsd/13.3 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64 +freebsd/13.5 python=3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64 freebsd/14.1 python=3.9,3.11 python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64 freebsd python_dir=/usr/local/bin become=su_sudo provider=aws arch=x86_64 macos/14.3 python=3.11 python_dir=/usr/local/bin become=sudo provider=parallels arch=x86_64 diff --git a/test/lib/ansible_test/_util/target/setup/bootstrap.sh b/test/lib/ansible_test/_util/target/setup/bootstrap.sh index db7e7cfcec3..9233876008b 100644 --- a/test/lib/ansible_test/_util/target/setup/bootstrap.sh +++ b/test/lib/ansible_test/_util/target/setup/bootstrap.sh @@ -26,13 +26,13 @@ install_ssh_keys() echo "${ssh_private_key}" > "${ssh_private_key_path}" # add public key to authorized_keys - authoried_keys_path="${HOME}/.ssh/authorized_keys" + authorized_keys_path="${HOME}/.ssh/authorized_keys" # the existing file is overwritten to avoid conflicts (ex: RHEL on EC2 blocks root login) - cat "${public_key_path}" > "${authoried_keys_path}" - chmod 0600 "${authoried_keys_path}" + cat "${public_key_path}" > "${authorized_keys_path}" + chmod 0600 "${authorized_keys_path}" - # add localhost's server keys to known_hosts + # add localhost server keys to known_hosts known_hosts_path="${HOME}/.ssh/known_hosts" for key in /etc/ssh/ssh_host_*_key.pub; do @@ -162,22 +162,14 @@ bootstrap_remote_freebsd() if [ "${controller}" ]; then jinja2_pkg="py${python_package_version}-jinja2" cryptography_pkg="py${python_package_version}-cryptography" - pyyaml_pkg="py${python_package_version}-yaml" + pyyaml_pkg="py${python_package_version}-pyyaml" packaging_pkg="py${python_package_version}-packaging" # Declare platform/python version combinations which do not have supporting OS packages available. # For these combinations ansible-test will use pip to install the requirements instead. case "${platform_version}/${python_version}" in - 13.3/3.9) - # defaults above 'just work'TM - ;; - 13.3/3.11) - jinja2_pkg="" # not available - cryptography_pkg="" # not available - pyyaml_pkg="" # not available - ;; - 14.1/3.9) - # defaults above 'just work'TM + 13.5/3.11) + # defaults available ;; 14.1/3.11) cryptography_pkg="" # not available