From 775ab35ddd897eaa242542f9ba29aa1593b1d93d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Mar 2020 21:34:10 +0200 Subject: [PATCH] Set pkg_mgr facts manually for FreeBSD and OpenSUSE (#60) * Set pkg_mgr facts manually for FreeBSD and OpenSUSE. ci_complete * Make pkg_mgr fact work everywhere. --- tests/integration/targets/archive/meta/main.yml | 1 + .../targets/cloud_init_data_facts/meta/main.yml | 2 ++ tests/integration/targets/consul/meta/main.yml | 1 + tests/integration/targets/etcd3/meta/main.yml | 2 ++ tests/integration/targets/filesystem/meta/main.yml | 1 + tests/integration/targets/firewalld/meta/main.yml | 2 ++ tests/integration/targets/gem/meta/main.yml | 1 + tests/integration/targets/hg/meta/main.yml | 1 + tests/integration/targets/iso_extract/meta/main.yml | 1 + .../lookup_hashi_vault/meta/main.yml | 2 ++ .../targets/lookup_passwordstore/meta/main.yml | 2 ++ tests/integration/targets/lvg/meta/main.yml | 1 + tests/integration/targets/npm/meta/main.yml | 2 ++ .../integration/targets/postgresql_ext/meta/main.yml | 1 + tests/integration/targets/sefcontext/meta/main.yml | 2 ++ tests/integration/targets/setup_cron/meta/main.yml | 2 ++ .../integration/targets/setup_mysql_db/meta/main.yml | 2 ++ .../integration/targets/setup_openssl/meta/main.yml | 2 ++ .../integration/targets/setup_pkg_mgr/tasks/main.yml | 12 ++++++++++++ .../targets/setup_postgresql_db/meta/main.yml | 2 ++ .../targets/setup_wildfly_server/meta/main.yml | 1 + .../integration/targets/supervisorctl/meta/main.yml | 2 ++ tests/integration/targets/ufw/meta/main.yml | 2 ++ tests/integration/targets/xattr/meta/main.yml | 2 ++ tests/integration/targets/xml/meta/main.yml | 2 ++ tests/integration/targets/yarn/meta/main.yml | 2 ++ 26 files changed, 53 insertions(+) create mode 100644 tests/integration/targets/cloud_init_data_facts/meta/main.yml create mode 100644 tests/integration/targets/etcd3/meta/main.yml create mode 100644 tests/integration/targets/firewalld/meta/main.yml create mode 100644 tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/meta/main.yml create mode 100644 tests/integration/targets/lookup_passwordstore/meta/main.yml create mode 100644 tests/integration/targets/npm/meta/main.yml create mode 100644 tests/integration/targets/sefcontext/meta/main.yml create mode 100644 tests/integration/targets/setup_cron/meta/main.yml create mode 100644 tests/integration/targets/setup_mysql_db/meta/main.yml create mode 100644 tests/integration/targets/setup_openssl/meta/main.yml create mode 100644 tests/integration/targets/setup_pkg_mgr/tasks/main.yml create mode 100644 tests/integration/targets/setup_postgresql_db/meta/main.yml create mode 100644 tests/integration/targets/supervisorctl/meta/main.yml create mode 100644 tests/integration/targets/ufw/meta/main.yml create mode 100644 tests/integration/targets/xattr/meta/main.yml create mode 100644 tests/integration/targets/xml/meta/main.yml create mode 100644 tests/integration/targets/yarn/meta/main.yml diff --git a/tests/integration/targets/archive/meta/main.yml b/tests/integration/targets/archive/meta/main.yml index 07faa21776..ca521ab1ef 100644 --- a/tests/integration/targets/archive/meta/main.yml +++ b/tests/integration/targets/archive/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - prepare_tests diff --git a/tests/integration/targets/cloud_init_data_facts/meta/main.yml b/tests/integration/targets/cloud_init_data_facts/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/cloud_init_data_facts/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/consul/meta/main.yml b/tests/integration/targets/consul/meta/main.yml index f5ea812bf8..f4c99a2ad7 100644 --- a/tests/integration/targets/consul/meta/main.yml +++ b/tests/integration/targets/consul/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: + - setup_pkg_mgr - setup_openssl diff --git a/tests/integration/targets/etcd3/meta/main.yml b/tests/integration/targets/etcd3/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/etcd3/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/filesystem/meta/main.yml b/tests/integration/targets/filesystem/meta/main.yml index 1810d4bec9..56bc554611 100644 --- a/tests/integration/targets/filesystem/meta/main.yml +++ b/tests/integration/targets/filesystem/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/firewalld/meta/main.yml b/tests/integration/targets/firewalld/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/firewalld/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/gem/meta/main.yml b/tests/integration/targets/gem/meta/main.yml index 07faa21776..ca521ab1ef 100644 --- a/tests/integration/targets/gem/meta/main.yml +++ b/tests/integration/targets/gem/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - prepare_tests diff --git a/tests/integration/targets/hg/meta/main.yml b/tests/integration/targets/hg/meta/main.yml index 07faa21776..ca521ab1ef 100644 --- a/tests/integration/targets/hg/meta/main.yml +++ b/tests/integration/targets/hg/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - prepare_tests diff --git a/tests/integration/targets/iso_extract/meta/main.yml b/tests/integration/targets/iso_extract/meta/main.yml index ffbb9b93a0..bdc4dfe016 100644 --- a/tests/integration/targets/iso_extract/meta/main.yml +++ b/tests/integration/targets/iso_extract/meta/main.yml @@ -1,3 +1,4 @@ dependencies: + - setup_pkg_mgr - prepare_tests - setup_epel diff --git a/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/meta/main.yml b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/lookup_passwordstore/meta/main.yml b/tests/integration/targets/lookup_passwordstore/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/lookup_passwordstore/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/lvg/meta/main.yml b/tests/integration/targets/lvg/meta/main.yml index 1810d4bec9..56bc554611 100644 --- a/tests/integration/targets/lvg/meta/main.yml +++ b/tests/integration/targets/lvg/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/npm/meta/main.yml b/tests/integration/targets/npm/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/npm/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/postgresql_ext/meta/main.yml b/tests/integration/targets/postgresql_ext/meta/main.yml index 4ce5a5837b..0ec7d2fcc1 100644 --- a/tests/integration/targets/postgresql_ext/meta/main.yml +++ b/tests/integration/targets/postgresql_ext/meta/main.yml @@ -1,2 +1,3 @@ dependencies: + - setup_pkg_mgr - setup_postgresql_db diff --git a/tests/integration/targets/sefcontext/meta/main.yml b/tests/integration/targets/sefcontext/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/sefcontext/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_cron/meta/main.yml b/tests/integration/targets/setup_cron/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/setup_cron/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_mysql_db/meta/main.yml b/tests/integration/targets/setup_mysql_db/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/setup_mysql_db/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_openssl/meta/main.yml b/tests/integration/targets/setup_openssl/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/setup_openssl/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml new file mode 100644 index 0000000000..7705ec5a48 --- /dev/null +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- set_fact: + pkg_mgr: community.general.pkgng + ansible_pkg_mgr: community.general.pkgng + cacheable: yes + when: ansible_os_family == "FreeBSD" + +- set_fact: + pkg_mgr: community.general.zypper + ansible_pkg_mgr: community.general.zypper + cacheable: yes + when: ansible_os_family == "Suse" diff --git a/tests/integration/targets/setup_postgresql_db/meta/main.yml b/tests/integration/targets/setup_postgresql_db/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/setup_postgresql_db/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_wildfly_server/meta/main.yml b/tests/integration/targets/setup_wildfly_server/meta/main.yml index 9f37e96cd9..6dabc5c7e6 100644 --- a/tests/integration/targets/setup_wildfly_server/meta/main.yml +++ b/tests/integration/targets/setup_wildfly_server/meta/main.yml @@ -1,2 +1,3 @@ dependencies: +- setup_pkg_mgr - setup_remote_tmp_dir diff --git a/tests/integration/targets/supervisorctl/meta/main.yml b/tests/integration/targets/supervisorctl/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/supervisorctl/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/ufw/meta/main.yml b/tests/integration/targets/ufw/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/ufw/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/xattr/meta/main.yml b/tests/integration/targets/xattr/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/xattr/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/xml/meta/main.yml b/tests/integration/targets/xml/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/xml/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr diff --git a/tests/integration/targets/yarn/meta/main.yml b/tests/integration/targets/yarn/meta/main.yml new file mode 100644 index 0000000000..5438ced5c3 --- /dev/null +++ b/tests/integration/targets/yarn/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - setup_pkg_mgr