config/workerconfig/centos/workerconfig.spec
Bin Qian 6acd2e3564 Single puppet manifest for AIO controllers
Create a single puppet manifest for AIO controllers.
This change includes:
1. remove workerconfig from an AIO controller deployment
2. running puppet based on subfunctions of the nodes

Depends-on: https://review.opendev.org/c/starlingx/stx-puppet/+/780600
Partial-Bug: 1918139
Signed-off-by: Bin Qian <bin.qian@windriver.com>
Change-Id: Ie3693219e3c19460ac5b617cc216cbc809ec2403
2021-04-14 22:05:55 -04:00

62 lines
1.4 KiB
RPMSpec

Summary: workerconfig
Name: workerconfig
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
%define debug_package %{nil}
Requires: systemd
%description
Initial worker node configuration
%package -n workerconfig-standalone
Summary: workerconfig
Group: base
%description -n workerconfig-standalone
Initial worker node configuration
%define initddir /etc/init.d/
%define goenableddir /etc/goenabled.d/
%define systemddir /etc/systemd/system/
%prep
%setup
%build
%install
make install INITDDIR=%{buildroot}%{initddir} GOENABLEDDIR=%{buildroot}%{goenableddir} SYSTEMDDIR=%{buildroot}%{systemddir}
%post -n workerconfig-standalone
if [ ! -e $D%{systemddir}/workerconfig.service ]; then
cp $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service
else
cmp -s $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service
if [ $? -ne 0 ]; then
rm -f $D%{systemddir}/workerconfig.service
cp $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service
fi
fi
systemctl enable workerconfig.service
%clean
%files
%defattr(-,root,root,-)
%doc LICENSE
%{initddir}/*
%files -n workerconfig-standalone
%defattr(-,root,root,-)
%dir %{systemddir}/config
%{systemddir}/config/workerconfig-standalone.service
%{goenableddir}/*