3accc08948
For debian build the dh_auto_install step will inject a DESTDIR based on the artifact build directory PKGBUILDIDR (equivalent to buildroot for spec files), but without control for the desired destination on the system (local_stx_ansible_dir): make -j32 install DESTDIR=/<<PKGBUILDDIR>>/debian/playbookconfig Change Makefile to support DESTDIR and PREFIX. Change spec files to use DESTDIR as buildroot and PREFIX as destination on the system. This allows to write clean debian rules files. Tested by doing a CentOS7 build-pkg & build-iso, then did run the ansible playbook. Story: 2009101 Task: 43051 Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com> Change-Id: Ic5a0463a8b5fa804f7829435d91e51a8e315802e
59 lines
1.7 KiB
RPMSpec
59 lines
1.7 KiB
RPMSpec
Name: playbookconfig
|
|
Version: 1.0.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
Summary: Ansible Playbooks for StarlingX Configurations
|
|
|
|
Group: Development/Tools/Other
|
|
License: Apache-2.0
|
|
URL: https://opendev.org/starlingx/config
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
Requires: ansible
|
|
Requires: python
|
|
Requires: python-netaddr
|
|
Requires: python-parted
|
|
Requires: python2-ptyprocess
|
|
Requires: python2-pexpect
|
|
Requires: sshpass
|
|
Requires: sysinv
|
|
Requires: cgts-client
|
|
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
This package contains playbooks used for configuring StarlingX.
|
|
|
|
%define local_stx_ansible_dir %{_datadir}/ansible/stx-ansible
|
|
%define local_etc_ansible %{_sysconfdir}/ansible
|
|
%define debug_package %{nil}
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}/src
|
|
|
|
%build
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot} PREFIX=%{local_stx_ansible_dir}
|
|
chmod 755 %{buildroot}%{local_stx_ansible_dir}/playbooks/roles/bootstrap/persist-config/files/populate_initial_config.py
|
|
chmod 755 %{buildroot}%{local_stx_ansible_dir}/playbooks/roles/bootstrap/prepare-env/files/check_root_disk_size.py
|
|
chmod 755 %{buildroot}%{local_stx_ansible_dir}/playbooks/roles/backup/backup-system/files/fm_alarm.py
|
|
chmod 755 %{buildroot}%{local_stx_ansible_dir}/playbooks/roles/rehome-subcloud/update-keystone-data/files/migrate_keystone_ids.py
|
|
|
|
|
|
%post
|
|
mkdir -p %{local_etc_ansible}
|
|
cp %{local_stx_ansible_dir}/playbooks/ansible.cfg %{local_etc_ansible}
|
|
cp %{local_stx_ansible_dir}/playbooks/hosts %{local_etc_ansible}
|
|
chmod 644 %{local_etc_ansible}/ansible.cfg
|
|
chmod 644 %{local_etc_ansible}/hosts
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE
|
|
%dir %{_datadir}/ansible
|
|
%dir %{local_stx_ansible_dir}
|
|
%{local_stx_ansible_dir}/*
|