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:
|
|
|
|
# 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
|
2017-09-15 04:12:09 +08:00
|
|
|
Obsoletes: ceph-iscsi-ansible <= 1.5
|
2016-11-18 06:21:20 +08:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2022-02-16 00:25:05 +08:00
|
|
|
BuildRequires: ansible >= 2.9
|
|
|
|
Requires: ansible >= 2.9
|
2019-02-20 04:31:15 +08:00
|
|
|
|
|
|
|
%if 0%{?rhel} == 7
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
Requires: python2-netaddr
|
|
|
|
%else
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
Requires: python3-netaddr
|
|
|
|
%endif
|
2016-11-18 06:21:20 +08:00
|
|
|
|
|
|
|
%description
|
|
|
|
Ansible playbooks for Ceph
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_datarootdir}/ceph-ansible
|
|
|
|
|
2021-01-07 03:22:04 +08:00
|
|
|
for f in ansible.cfg *.yml *.sample group_vars roles library module_utils 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
|
|
|
# These untested playbooks are too unstable for users.
|
2017-08-31 05:30:49 +08:00
|
|
|
rm -r infrastructure-playbooks/untested-by-ci
|
2017-09-15 04:42:53 +08:00
|
|
|
%if ! 0%{?fedora} && ! 0%{?centos}
|
2017-10-17 17:49:41 +08:00
|
|
|
# remove ability to install ceph community version
|
2019-06-07 16:16:16 +08:00
|
|
|
rm roles/ceph-common/tasks/installs/redhat_{community,dev}_repository.yml
|
2017-09-15 04:42:53 +08:00
|
|
|
# Ship only the Red Hat Ceph Storage config (overwrite upstream settings)
|
|
|
|
cp group_vars/rhcs.yml.sample group_vars/all.yml.sample
|
2017-09-15 01:22:37 +08:00
|
|
|
%endif
|
2017-05-11 01:08:33 +08:00
|
|
|
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
|