3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 %define COMPONENT security
16 %define RPM_NAME caas-%{COMPONENT}
17 %define RPM_MAJOR_VERSION 1.0.0
18 %define RPM_MINOR_VERSION 1
19 %define RBAC_MANIFEST_DIR /var/lib/caas/rbac_manifests/
22 Version: %{RPM_MAJOR_VERSION}
23 Release: %{RPM_MINOR_VERSION}%{?dist}
24 Summary: Containers as a Service security related playbooks + manifests
25 License: %{_platform_license}
27 Vendor: %{_platform_vendor}
28 Source0: %{name}-%{version}.tar.gz
31 This rpm contains the necessary security related playbooks + manifests for the caas subsystem.
39 mkdir -p %{buildroot}/%{RBAC_MANIFEST_DIR}/
40 rsync -av rbac_manifests/* %{buildroot}/%{RBAC_MANIFEST_DIR}/
42 mkdir -p %{buildroot}/%{_playbooks_path}/
43 rsync -av ansible/playbooks/* %{buildroot}/%{_playbooks_path}/
45 mkdir -p %{buildroot}/%{_roles_path}/
46 rsync -av ansible/roles/* %{buildroot}/%{_roles_path}/
49 %{RBAC_MANIFEST_DIR}/*
57 mkdir -p %{_postconfig_path}/
58 ln -sf %{_playbooks_path}/rbac.yaml %{_postconfig_path}
59 ln -sf %{_playbooks_path}/security.yaml %{_postconfig_path}
64 rm -f %{_postconfig_path}/rbac.yaml
65 rm -f %{_postconfig_path}/security.yaml