summaryrefslogtreecommitdiff
path: root/test/integration/targets/setup_rpm_repo
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2019-01-30 10:56:57 +1000
committerGitHub <noreply@github.com>2019-01-30 10:56:57 +1000
commit670a45c3aca0a4c791038955dd31c498bc303a55 (patch)
tree0fe67dd1381eb1bd98b2f85dbdafc2ad7e40bc25 /test/integration/targets/setup_rpm_repo
parent9eef9a37027231a9b2fabc0f69008ab57e2a3a32 (diff)
downloadansible-670a45c3aca0a4c791038955dd31c498bc303a55.tar.gz
test dnf - fix groups idempotency on RHEL and fix postgresql issue (#51319)
Diffstat (limited to 'test/integration/targets/setup_rpm_repo')
-rw-r--r--test/integration/targets/setup_rpm_repo/files/comps.xml36
-rw-r--r--test/integration/targets/setup_rpm_repo/tasks/main.yml10
2 files changed, 46 insertions, 0 deletions
diff --git a/test/integration/targets/setup_rpm_repo/files/comps.xml b/test/integration/targets/setup_rpm_repo/files/comps.xml
new file mode 100644
index 0000000000..d7b4763a82
--- /dev/null
+++ b/test/integration/targets/setup_rpm_repo/files/comps.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
+<comps>
+ <group>
+ <id>customgroup</id>
+ <name>Custom Group</name>
+ <description></description>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <packagelist>
+ <packagereq type="mandatory">foo</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>customenvgroup</id>
+ <name>Custom Environment Group</name>
+ <description></description>
+ <default>false</default>
+ <uservisible>false</uservisible>
+ <display_order>1024</display_order>
+ <packagelist>
+ <packagereq type="mandatory">bar</packagereq>
+ </packagelist>
+ </group>
+
+ <environment>
+ <id>customenvgroup-environment</id>
+ <name>Custom Environment Group</name>
+ <description></description>
+ <display_order>1024</display_order>
+ <grouplist>
+ <groupid>customenvgroup</groupid>
+ </grouplist>
+ </environment>
+</comps>
diff --git a/test/integration/targets/setup_rpm_repo/tasks/main.yml b/test/integration/targets/setup_rpm_repo/tasks/main.yml
index 6f80b701a4..fa2c0bdb43 100644
--- a/test/integration/targets/setup_rpm_repo/tasks/main.yml
+++ b/test/integration/targets/setup_rpm_repo/tasks/main.yml
@@ -11,6 +11,7 @@
name: "{{ item }}"
with_items:
- python{{ ansible_python_version.split(".")[0] }}-rpmfluff
+ - createrepo
when:
- ansible_distribution in ['Fedora']
@@ -72,6 +73,15 @@
baseurl: "file://{{ repodir }}"
gpgcheck: no
+ - name: Copy comps.xml file
+ copy:
+ src: comps.xml
+ dest: "{{ repodir }}"
+ register: repodir_comps
+
+ - name: Register comps.xml on repo
+ command: createrepo -g {{ repodir_comps.dest | quote }} {{ repodir | quote }}
+
- name: Create RPMs and put them into a repo (i686)
shell: "{{ansible_python_interpreter}} /tmp/create-repo.py i686"
register: repo_i686