diff --git a/tests/integration/targets/cargo/meta/main.yml b/tests/integration/targets/cargo/meta/main.yml new file mode 100644 index 0000000000..b63c3d017c --- /dev/null +++ b/tests/integration/targets/cargo/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/django_manage/meta/main.yml b/tests/integration/targets/django_manage/meta/main.yml new file mode 100644 index 0000000000..b63c3d017c --- /dev/null +++ b/tests/integration/targets/django_manage/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/listen_ports_facts/meta/main.yml b/tests/integration/targets/listen_ports_facts/meta/main.yml new file mode 100644 index 0000000000..b63c3d017c --- /dev/null +++ b/tests/integration/targets/listen_ports_facts/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/odbc/meta/main.yml b/tests/integration/targets/odbc/meta/main.yml index 85b1dc7e4c..d88c3e1429 100644 --- a/tests/integration/targets/odbc/meta/main.yml +++ b/tests/integration/targets/odbc/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: + - setup_pkg_mgr - setup_postgresql_db diff --git a/tests/integration/targets/pacman/meta/main.yml b/tests/integration/targets/pacman/meta/main.yml index 1810d4bec9..add84cee60 100644 --- a/tests/integration/targets/pacman/meta/main.yml +++ b/tests/integration/targets/pacman/meta/main.yml @@ -1,2 +1,3 @@ dependencies: - setup_remote_tmp_dir + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_java_keytool/tasks/main.yml b/tests/integration/targets/setup_java_keytool/tasks/main.yml index fb909320e0..be84495266 100644 --- a/tests/integration/targets/setup_java_keytool/tasks/main.yml +++ b/tests/integration/targets/setup_java_keytool/tasks/main.yml @@ -4,12 +4,10 @@ # and should not be used as examples of how to write Ansible roles # #################################################################### - set_fact: - # TODO: re-enable Archlinux! has_java_keytool: >- {{ ansible_os_family not in ['Darwin', 'FreeBSD'] and not (ansible_distribution == "CentOS" and ansible_distribution_version is version("7.0", "<")) - and not (ansible_distribution == "Archlinux") }} - name: Include OS-specific variables diff --git a/tests/integration/targets/setup_openldap/meta/main.yml b/tests/integration/targets/setup_openldap/meta/main.yml index ed97d539c0..b63c3d017c 100644 --- a/tests/integration/targets/setup_openldap/meta/main.yml +++ b/tests/integration/targets/setup_openldap/meta/main.yml @@ -1 +1,3 @@ --- +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml b/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml new file mode 100644 index 0000000000..b92f22d2e1 --- /dev/null +++ b/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml @@ -0,0 +1,19 @@ +--- +# Since Arch Linux is a rolling distribution, it regularly needs its packages upgraded, otherwise some tests might +# stop working due to conflicts during package installation. Since there is no good way to do this on container +# startup time, we use the setup_pkg_mgr setup role to do this once per CI run (hopefully). In case the Arch Linux +# tests are run outside of a container, we're using a date-based tag (see below) to avoid this running more than +# once per day. + +- name: Create tag + copy: + dest: /tmp/.ansible_archlinux_sysupgrade_tag + content: | + Last ArchLinux system upgrade by integration tests was done on {{ ansible_facts.date_time.date }}. + register: archlinux_upgrade_tag + +- name: Upgrade all packages + pacman: + update_cache: true + upgrade: true + when: archlinux_upgrade_tag is changed diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml index 66735fed11..9e028ffeed 100644 --- a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -16,9 +16,20 @@ cacheable: yes when: ansible_os_family == "Suse" +- set_fact: + pkg_mgr: community.general.pacman + ansible_pkg_mgr: community.general.pacman + cacheable: yes + when: ansible_os_family == "Archlinux" + - shell: cmd: | sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*.repo sed -i 's%#baseurl=http://mirror.centos.org/$contentdir/$releasever/%baseurl=https://vault.centos.org/8.4.2105/%g' /etc/yum.repos.d/CentOS-Linux-*.repo ignore_errors: true # This fails for CentOS Stream 8 when: ansible_distribution in 'CentOS' and ansible_distribution_major_version == '8' + +- when: ansible_os_family == "Archlinux" + block: + - name: ArchLinux specific setup + include: archlinux.yml diff --git a/tests/integration/targets/setup_rundeck/meta/main.yml b/tests/integration/targets/setup_rundeck/meta/main.yml index e69de29bb2..b63c3d017c 100644 --- a/tests/integration/targets/setup_rundeck/meta/main.yml +++ b/tests/integration/targets/setup_rundeck/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/timezone/meta/main.yml b/tests/integration/targets/timezone/meta/main.yml new file mode 100644 index 0000000000..b63c3d017c --- /dev/null +++ b/tests/integration/targets/timezone/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - setup_pkg_mgr