forked from ceph/ceph-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ceph-ansible.spec.in
65 lines (52 loc) · 1.85 KB
/
ceph-ansible.spec.in
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
%global commit @COMMIT@
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: ceph-ansible
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: Ansible playbooks for Ceph
# Some files have been copied from Ansible (GPLv3+). For example:
# library/ceph_facts
# plugins/actions/config_template.py
# roles/ceph-common/plugins/actions/config_template.py
License: ASL 2.0 and GPLv3+
URL: https://github.com/ceph/ceph-ansible
Source0: %{name}-%{version}-%{shortcommit}.tar.gz
Obsoletes: ceph-iscsi-ansible <= 1.5
BuildArch: noarch
BuildRequires: ansible >= 2.4.2.0
BuildRequires: python2-devel
Requires: ansible >= 2.4.2.0
Requires: python-netaddr
%description
Ansible playbooks for Ceph
%prep
%autosetup -p1
%build
%install
mkdir -p %{buildroot}%{_datarootdir}/ceph-ansible
for f in ansible.cfg *.yml *.sample group_vars roles library plugins infrastructure-playbooks; do
cp -a $f %{buildroot}%{_datarootdir}/ceph-ansible
done
pushd %{buildroot}%{_datarootdir}/ceph-ansible
# Strip coreos files.
# These are unneeded on RPM-based distros, and the playbooks download random
# things from around the internet.
rm -r roles/ceph-common-coreos
rm group_vars/common-coreoss.yml.sample
# These untested playbooks are too unstable for users.
rm -r infrastructure-playbooks/untested-by-ci
%if ! 0%{?fedora} && ! 0%{?centos}
# remove ability to install ceph community version
rm roles/ceph-common/tasks/installs/redhat_{community,custom,dev}_repository.yml
# Ship only the Red Hat Ceph Storage config (overwrite upstream settings)
cp group_vars/rhcs.yml.sample group_vars/all.yml.sample
%endif
popd
%check
# Borrowed from upstream's .travis.yml:
ansible-playbook -i dummy-ansible-hosts test.yml --syntax-check
%files
%doc README.rst
%license LICENSE
%{_datarootdir}/ceph-ansible
%changelog