1 Star 0 Fork 3

卫少坤/ovirt-ansible-infra

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ovirt-ansible-infra.spec 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
kiki 提交于 2020-03-04 16:43 . Package Init
%global rolename infra
%global roleprefix ovirt.
%global roleprefix_legacy ovirt-
%global roleprefix_legacy_uppercase oVirt.
%global ansible_roles_dir ansible/roles
Name: ovirt-ansible-infra
Summary: Ansible role to deploy oVirt infrastructure.
Version: 1.1.13
Release: 1%{?release_suffix}%{?dist}
Source0: http://resources.ovirt.org/pub/src/ovirt-ansible-infra/ovirt-ansible-infra-1.1.13.tar.gz
License: ASL 2.0
Group: Virtualization/Management
BuildArch: noarch
Url: http://www.ovirt.org
Requires: ansible >= 2.7.2
%description
This Ansible role provide funtionality to oVirt infrastructure.
%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_dash = "%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}"
path_uppercase = "%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy_uppercase}%{rolename}"
st = posix.stat(path_dash)
if st and st.type == "directory" then
os.execute('rm -rf "'..path_dash..'"')
end
st = posix.stat(path_uppercase)
if st and st.type == "directory" then
os.execute('rm -rf "'..path_uppercase..'"')
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}
export ROLENAME_LEGACY_UPPERCASE=%{buildroot}%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy_uppercase}%{rolename}
sh build.sh install
%files
%{_datadir}/%{ansible_roles_dir}/%{roleprefix}%{rolename}
%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}
%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy_uppercase}%{rolename}
%doc README.md
%doc examples/
%license LICENSE
%changelog
* Wed Mar 04 2020 Huihui Fu <huihui.fu@cs2c.com.cn> - 1.1.13-1
- Package initialization
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weishaokun/ovirt-ansible-infra.git
git@gitee.com:weishaokun/ovirt-ansible-infra.git
weishaokun
ovirt-ansible-infra
ovirt-ansible-infra
master

搜索帮助