This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathovirt-ansible-cluster-upgrade.spec.in
71 lines (55 loc) · 2.25 KB
/
ovirt-ansible-cluster-upgrade.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
66
67
68
69
70
71
%global rolename cluster-upgrade
%global roleprefix oVirt.
%global roleprefix_legacy ovirt-
%global ansible_roles_dir ansible/roles
Name: @PACKAGE_NAME@
Summary: Ansible role to upgrade cluster of hosts in oVirt
Version: @RPM_VERSION@
Release: @RPM_RELEASE@%{?release_suffix}%{?dist}
Source0: http://resources.ovirt.org/pub/src/@PACKAGE_NAME@/@PACKAGE_NAME@-@[email protected]
License: ASL 2.0
Group: Virtualization/Management
BuildArch: noarch
Url: http://www.ovirt.org
Requires: ansible >= 2.4
%description
This Ansible role provide funtionality to upgrade cluster of hosts in oVirt engine,
using oVirt engine API.
%pretrans -p <lua>
-- Remove the legacy directory before installing the symlink. This is known issue in RPM:
-- https://fedoraproject.org/wiki/Packaging:Directory_Replacement
path = "%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}"
st = posix.stat(path)
if st and st.type == "directory" then
os.execute('rm -rf "'..path..'"')
end
%prep
%setup -c -q
%build
%install
export PKG_DATA_DIR_ORIG=%{_datadir}/%{ansible_roles_dir}/%{roleprefix}%{rolename}
export PKG_DATA_DIR=%{buildroot}$PKG_DATA_DIR_ORIG
export PKG_DOC_DIR=%{buildroot}%{_pkgdocdir}
export ROLENAME_LEGACY=%{buildroot}%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}
sh build.sh install
%files
%{_datadir}/%{ansible_roles_dir}/%{roleprefix}%{rolename}
%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}
%doc README.md
%doc examples/
%license LICENSE
%changelog
* Thu Mar 15 2018 Ondra Machacek <[email protected]> - 1.1.6-1
- Fail the role if any host fail to upgrade rhbz#1539776.
* Wed Feb 14 2018 Ondra Machacek <[email protected]> - 1.1.5-1
- Add use_maintenance_policy parameter rhbz#1539761.
- Add new reboot_after_upgrade parameter rhbz#1539774.
- Fail the role if any host fail to upgrade rhbz#1539776.
* Wed Jan 17 2018 Ondra Machacek <[email protected]> - 1.1.4-1
- Support ovirt_auth with env params.
* Wed Jan 17 2018 Ondra Machacek <[email protected]> - 1.1.3-1
- Add %pretrans scriplet to remove legacy role name.
* Wed Jan 17 2018 Ondra Machacek <[email protected]> - 1.1.2-1
- Rename ovirt. to oVirt. to sync with galaxy.
* Mon Nov 27 2017 Ondra Machacek <[email protected]> - 1.1.0-1
- Initial release