forked from openshift/openshift-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openshift-ansible.spec
74 lines (61 loc) · 2.32 KB
/
openshift-ansible.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# %commit is intended to be set by tito custom builders provided
# in the .tito/lib directory. The values in this spec file will not be kept up to date.
%{!?commit:
%global commit c64d09e528ca433832c6b6e6f5c7734a9cc8ee6f
}
# This is inserted to prevent RPM from requiring "/usr/bin/ansible-playbook"
# The ansible-playbook requirement will be provided by the explicit
# "Requires: ansible" directive
%global __requires_exclude ^/usr/bin/ansible-playbook$
Name: openshift-ansible
Version: 4.1.0
Release: 0.0.0%{?dist}
Summary: Openshift and Atomic Enterprise Ansible
License: ASL 2.0
URL: https://github.com/openshift/openshift-ansible
Source0: https://github.com/openshift/openshift-ansible/archive/%{commit}/%{name}-%{version}.tar.gz
BuildArch: noarch
Requires: ansible >= 2.8.2
Requires: openshift-clients
%description
OpenShift RHEL Worker Management Ansible Playbooks
%prep
%setup -q
%build
%install
# Base openshift-ansible install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/ansible/%{name}/inventory
cp -rp inventory/dynamic %{buildroot}%{_datadir}/ansible/%{name}/inventory
cp ansible.cfg %{buildroot}%{_datadir}/ansible/%{name}/ansible.cfg
# Install example inventory into docs/examples
mkdir -p docs/example-inventories
cp inventory/hosts.* inventory/README.md docs/example-inventories/
cp -rp playbooks %{buildroot}%{_datadir}/ansible/%{name}/
cp -rp roles %{buildroot}%{_datadir}/ansible/%{name}/
cp -rp test %{buildroot}%{_datadir}/ansible/%{name}/
# Base openshift-ansible files
%files
%doc README*
%license LICENSE
%dir %{_datadir}/ansible/%{name}
%{_datadir}/ansible/%{name}/inventory
%{_datadir}/ansible/%{name}/ansible.cfg
%doc docs
%{_datadir}/ansible/%{name}/playbooks
%{_datadir}/ansible/%{name}/roles
# ----------------------------------------------------------------------------------
# openshift-ansible-tests subpackage
# ----------------------------------------------------------------------------------
%package test
Summary: Openshift and Atomic Enterprise Ansible Test Playbooks
Requires: %{name} = %{version}-%{release}
Requires: ansible = 2.8.2
Requires: python2-openshift
Requires: openssh-clients
BuildArch: noarch
%description test
%{summary}.
%files test
%{_datadir}/ansible/%{name}/test
%changelog