From 9ad151c698ceeec947c300701413ecf2a40a7bcc Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Fri, 25 Jun 2021 23:29:05 -0400 Subject: [PATCH] put our ansible roles in standard location the share directory is the standard location for installing ansible playbooks this puts our playbooks into that location so they can be picked up without the need to modify the load path 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 | 11 ++++++----- rpm_spec/subpackages/manageiq-core | 1 + rpm_spec/subpackages/manageiq-system | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rpm_spec/manageiq.spec.in b/rpm_spec/manageiq.spec.in index 697bb99c..dbe4c49a 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 roles 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,11 +129,6 @@ pushd ./%{appliance_builddir}/LINK/etc done popd -%{__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}