From a98801903df4a9a3af65ad917e96fc4f3e3437a6 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 7 Nov 2024 13:19:26 -0800 Subject: 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 --- .azure-pipelines/azure-pipelines.yml | 8 ++++---- changelogs/fragments/ansible-test-remotes.yml | 2 ++ test/integration/targets/cron/defaults/main.yml | 1 - .../integration/targets/setup_cron/defaults/main.yml | 1 + test/integration/targets/setup_cron/tasks/main.yml | 1 + .../targets/setup_cron/vars/freebsd-14.yml | 4 ++++ test/integration/targets/setup_cron/vars/freebsd.yml | 1 + test/lib/ansible_test/_data/completion/remote.txt | 2 +- .../lib/ansible_test/_util/target/setup/bootstrap.sh | 20 ++++++-------------- 9 files changed, 20 insertions(+), 20 deletions(-) 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 d2078a43cf..d339b43a4f 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -90,8 +90,8 @@ stages: test: rhel/9.4@3.9 - name: RHEL 9.4 py312 test: rhel/9.4@3.12 - - name: FreeBSD 13.3 - test: freebsd/13.3 + - name: FreeBSD 13.4 + test: freebsd/13.4 - name: FreeBSD 14.1 test: freebsd/14.1 groups: @@ -104,8 +104,8 @@ stages: test: macos/14.3 - name: RHEL 9.4 test: rhel/9.4 - - name: FreeBSD 13.3 - test: freebsd/13.3 + - name: FreeBSD 13.4 + test: freebsd/13.4 - name: FreeBSD 14.1 test: freebsd/14.1 groups: diff --git a/changelogs/fragments/ansible-test-remotes.yml b/changelogs/fragments/ansible-test-remotes.yml new file mode 100644 index 0000000000..cf3c832c8e --- /dev/null +++ b/changelogs/fragments/ansible-test-remotes.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Replace remote FreeBSD 13.3 with 13.4. diff --git a/test/integration/targets/cron/defaults/main.yml b/test/integration/targets/cron/defaults/main.yml deleted file mode 100644 index 37e6fc3714..0000000000 --- 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 a6d1965fd2..1a13ad2676 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 73cce2a266..90f3085df1 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 0000000000..21d84a3c81 --- /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 41ed449395..80c1fd28e2 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 dea1d33a6a..011ce13348 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.20 python=3.12 become=doas_sudo provider=aws arch=x86_64 alpine become=doas_sudo provider=aws arch=x86_64 fedora/40 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.4 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 b926a8e673..22a9e5dcc0 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 @@ -168,16 +168,8 @@ bootstrap_remote_freebsd() # 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.4/3.11) + # defaults available ;; 14.1/3.11) cryptography_pkg="" # not available -- cgit v1.2.3