2016-11-18 06:21:20 +08:00
|
|
|
%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
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2016-12-16 02:01:24 +08:00
|
|
|
BuildRequires: ansible >= 2.2.0.0
|
2016-11-18 06:21:20 +08:00
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
2016-12-16 02:01:24 +08:00
|
|
|
Requires: ansible >= 2.2.0.0
|
2017-07-03 22:07:54 +08:00
|
|
|
Requires: python-netaddr
|
2016-11-18 06:21:20 +08:00
|
|
|
|
|
|
|
%description
|
|
|
|
Ansible playbooks for Ceph
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_datarootdir}/ceph-ansible
|
|
|
|
|
2016-12-13 05:52:23 +08:00
|
|
|
for f in ansible.cfg *.yml *.sample group_vars roles library plugins infrastructure-playbooks; do
|
2016-11-18 06:21:20 +08:00
|
|
|
cp -a $f %{buildroot}%{_datarootdir}/ceph-ansible
|
|
|
|
done
|
|
|
|
|
2017-05-11 01:08:33 +08:00
|
|
|
pushd %{buildroot}%{_datarootdir}/ceph-ansible
|
2017-09-07 01:12:54 +08:00
|
|
|
# Strip coreos files.
|
|
|
|
# These are unneeded on RPM-based distros, and the playbooks download random
|
|
|
|
# things from around the internet.
|
2017-05-11 01:08:33 +08:00
|
|
|
rm -r roles/ceph-common-coreos
|
|
|
|
rm group_vars/common-coreoss.yml.sample
|
2017-09-07 01:12:54 +08:00
|
|
|
# These untested playbooks are too unstable for users.
|
2017-08-31 05:30:49 +08:00
|
|
|
rm -r infrastructure-playbooks/untested-by-ci
|
2017-05-11 01:08:33 +08:00
|
|
|
popd
|
|
|
|
|
2017-06-05 23:17:59 +08:00
|
|
|
# Strip iscsi files.
|
|
|
|
# These are just placeholders until ceph-iscsi-gw can merge into
|
|
|
|
# ceph-ansible. (See https://bugzilla.redhat.com/1454945).
|
|
|
|
pushd %{buildroot}%{_datarootdir}/ceph-ansible
|
|
|
|
rm -r roles/ceph-iscsi-gw
|
|
|
|
popd
|
|
|
|
|
2016-11-18 06:21:20 +08:00
|
|
|
%check
|
|
|
|
# Borrowed from upstream's .travis.yml:
|
|
|
|
ansible-playbook -i dummy-ansible-hosts test.yml --syntax-check
|
|
|
|
|
|
|
|
%files
|
2017-08-24 21:18:17 +08:00
|
|
|
%doc README.rst
|
2016-11-18 06:21:20 +08:00
|
|
|
%license LICENSE
|
|
|
|
%{_datarootdir}/ceph-ansible
|
|
|
|
|
|
|
|
%changelog
|