From 5112f9d4f08ab35968c57115a1ffdd9eedcd7754 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Fri, 13 Aug 2021 19:44:54 -0400 Subject: [PATCH] Move ansible playbooks to standard location This lets us drop custom path definition and remove the need to introduce any configuration changes. --- rpm_spec/manageiq.spec.in | 16 ++++++---------- rpm_spec/subpackages/manageiq-core | 1 + rpm_spec/subpackages/manageiq-system | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/rpm_spec/manageiq.spec.in b/rpm_spec/manageiq.spec.in index c8e54468..a8f5ea9e 100644 --- a/rpm_spec/manageiq.spec.in +++ b/rpm_spec/manageiq.spec.in @@ -102,6 +102,12 @@ cd %{_builddir} #sample configuration files %{__mv} %{buildroot}%{app_root}/config/cable.yml.sample %{buildroot}%{app_root}/config/cable.yml +# Move playbooks to playbook share +mkdir -p %{buildroot}/usr/share/ansible/roles/ +for i in %{buildroot}%{app_root}/content/ansible_consolidated/roles/* ; do + %{__mv} $i %{buildroot}/usr/share/ansible/roles/ +done + ## from appliance #symlink some executables %{__mkdir} -p %{buildroot}/%{_bindir} @@ -123,16 +129,6 @@ pushd ./%{appliance_builddir}/LINK/etc done popd -%{__mkdir} -p %{buildroot}/usr/share/ansible/roles -for i in %{buildroot}%{app_root}/content/ansible_consolidated/roles/* ; do - ln -s $i %{buildroot}/usr/share/ansible/roles/ -done - -%{__mkdir} -p %{buildroot}/root -pushd ./%{appliance_builddir}/LINK/root - ln -s %{appliance_root}/LINK/root/.ansible.cfg %{buildroot}/root/.ansible.cfg -popd - pushd ./%{appliance_builddir}/LINK ln -s %{appliance_root}/LINK/.toprc %{buildroot}/.toprc popd diff --git a/rpm_spec/subpackages/manageiq-core b/rpm_spec/subpackages/manageiq-core index 8c411f5c..b45466bf 100644 --- a/rpm_spec/subpackages/manageiq-core +++ b/rpm_spec/subpackages/manageiq-core @@ -60,3 +60,4 @@ done %exclude %{app_root}/public/ui %exclude %{app_root}/public/upload %exclude %{app_root}/log/apache +/usr/share/ansible/roles/ diff --git a/rpm_spec/subpackages/manageiq-system b/rpm_spec/subpackages/manageiq-system index da736ec5..a5223a95 100644 --- a/rpm_spec/subpackages/manageiq-system +++ b/rpm_spec/subpackages/manageiq-system @@ -20,7 +20,6 @@ Requires: openldap-clients %files system %defattr(-,root,root,-) /.toprc -/root/.ansible.cfg %{appliance_root} %{app_root}/log/apache %dir %{manifest_root}