From b1aa7eeed016328a3ef25bdc993d164f86ccf5c8 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 21 Nov 2019 09:48:48 +0100 Subject: [PATCH] postinstall: Copy ceph ansible modules if present ceph-ansible 3.1 (and newer) refactored the handling of ceph keys by leveraging a new `ceph-key` ansible module. To support the new ceph-ansible 3.1, we copy any ceph ansible modules similar to the way we currently handle ceph roles. This change is backwards compatible with the current ceph-ansible 3.0. Signed-off-by: Alexandru Antone Signed-off-by: Alexandru Avadanii Change-Id: I41364261dd8f445ddedf9d07eaa2cadc9da90b5e --- infra-ansible.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infra-ansible.spec b/infra-ansible.spec index 8cedac6..a3d8730 100644 --- a/infra-ansible.spec +++ b/infra-ansible.spec @@ -15,7 +15,7 @@ Name: infra-ansible Version: %{_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Contains ansible playbook and roles for Akraino rec blueprint License: %{_platform_licence} Source0: %{name}-%{version}.tar.gz @@ -153,6 +153,10 @@ cp systemd/sriov.sh %{buildroot}/opt/sriov for role in /usr/share/ceph-ansible/roles/*; do ln -sf $role /etc/ansible/roles/ done +mkdir -p /etc/ansible/roles/plugins/library +for module in /usr/share/ceph-ansible/library/*.py*; do + ln -sf $module /etc/ansible/roles/plugins/library +done systemctl enable sriov %preun -- 2.16.6