ansible/ansible.spec
Lars Vogdt 28ccd94079 - update to 1.3.4:
Highlighted new features:
  + accelerated mode: An enhanced fireball mode that requires zero 
    bootstrapping and fewer requirements plus adds capabilities 
    like sudo commands.
  + role defaults: Allows roles to define a set of variables at the 
    lowest priority. These variables can be overridden by any 
    other variable.
  + new /etc/ansible/facts.d allows JSON or INI-style facts to be 
    provided from the remote node, and supports executable fact 
    programs in this dir. Files must end in *.fact.
  + added the ability to make undefined template variables raise 
    errors (see ansible.cfg)
  + (DOCS PENDING) sudo: True/False and sudo_user: True/False can be 
    set at include and role level
  + added changed_when: (expression) which allows overriding whether
    a result is changed or not and can work with registered expressions
  + --extra-vars can now take a file as input, e.g., "-e @filename" 
    and can also be formatted as YAML
  + external inventory scripts may now return host variables in one 
    pass, which allows them to be much more efficient for large 
    numbers of hosts
  + if --forks exceeds the numbers of hosts, it will be automatically 
    reduced. Set forks to 0 and you get "as many forks as I have 
    hosts" out of the box.
  + enabled error_on_undefined_vars by default, which will make 
    errors in playbooks more obvious
  + role dependencies -- one role can now pull in another, with 
    parameters of its own.
  + added the ability to have tasks execute even during a check

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible?expand=0&rev=11
2013-10-31 17:30:42 +00:00

173 lines
4.8 KiB
RPMSpec

#
# spec file for package ansible
#
# Copyright 2013 by Lars Vogdt
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Name: ansible
Version: 1.3.4
Release: 1
Summary: SSH-based configuration management, deployment, and task execution system
License: GPL-3.0+
Url: http://ansible.github.com
Group: System/Management
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# (open)SUSE
#
%if 0%{?suse_version}
BuildRequires: python-devel
Requires: python-PyYAML
Requires: python-jinja2
%if 0%{?suse_version} > 01020
BuildRequires: fdupes
Recommends: python-paramiko
%else
Requires: python-paramiko
%endif
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch: noarch
%endif
%endif
#
# RHEL
#
%if ( 0%{?rhel} && 0%{?rhel} <= 5 ) || ( 0%{?rhel_version} && 0%{?rhel_version} <= 505 )
#BuildRequires: python26-devel
BuildRequires: python2-devel
Requires: python26-PyYAML
Requires: python26-paramiko
Requires: python26-jinja2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
%if 0%{?rhel} > 5 || 0%{?rhel_version} > 505
BuildRequires: python2-devel
Requires: PyYAML
Requires: python-paramiko
Requires: python-jinja2
%endif
#
# Fedora
#
%if 0%{?fedora}
BuildRequires: python2-devel
Requires: PyYAML
Requires: python-paramiko
Requires: python-jinja2
%endif
%description
Ansible is a radically simple model-driven configuration management,
multi-node deployment, and remote task execution system. Ansible works
over SSH and does not require any software or daemons to be installed
on remote nodes. Extension modules can be written in any language and
are transferred to managed machines automatically.
%package fireball
Summary: Ansible fireball transport support
Group: System/Management
Requires: %{name} = %{version}
#
# RHEL
#
%if ( 0%{?rhel} && 0%{?rhel} <= 5 ) || ( 0%{?rhel_version} && 0%{?rhel_version} <= 505 )
Requires: python26-keyczar
Requires: python26-zmq
#
# (open)SUSE | Fedora
#
%else
Requires: python-keyczar
%endif
# (open)SUSE
%if 0%{?suse_version}
Requires: python-pyzmq
%else
Requires: python-zmq
%endif
%description fireball
Ansible can optionally use a 0MQ based transport mechanism, which is
considerably faster than the standard ssh mechanism when there are
multiple actions, but requires additional supporting packages.
%package node-fireball
Summary: Ansible fireball transport - node end support
Group: System/Management
#
# RHEL
#
%if ( 0%{?rhel} && 0%{?rhel} <= 5 ) || ( 0%{?rhel_version} && 0%{?rhel_version} <= 505 )
Requires: python26-keyczar
Requires: python26-zmq
#
# (open)SUSE | Fedora
#
%else
Requires: python-keyczar
Requires: python-pyzmq
%endif
%description node-fireball
Ansible can optionally use a 0MQ based transport mechanism, which has
additional requirements for nodes to use. This package includes those
requirements.
%prep
%setup -q
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
cp examples/hosts %{buildroot}%{_sysconfdir}/ansible/
cp examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/
mkdir -p %{buildroot}%{_mandir}/man1/
cp -v docs/man/man1/*.1 %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}%{_datadir}/ansible
cp -vr library/* %{buildroot}%{_datadir}/ansible/
%if 0%{?suse_version} > 01020
%fdupes %{buildroot}
%endif
%files
%defattr(-,root,root,-)
%doc CHANGELOG.md CONTRIBUTING.md COPYING README.md RELEASES.txt VERSION
%doc examples/playbooks
%doc %{_mandir}/man1/ansible*
%dir %{_datadir}/ansible
%dir %{_sysconfdir}/%{name}
%{python_sitelib}/ansible*
%{_bindir}/ansible*
%config(noreplace) %{_sysconfdir}/ansible
%{_datadir}/ansible/*
%exclude %{_datadir}/ansible/utilities/fireball
%exclude %{_mandir}/man3/ansible.fireball.*
%files fireball
%defattr(-,root,root,-)
%{_datadir}/ansible/utilities/fireball
%files node-fireball
%defattr(-,root,root,-)
%doc README.md COPYING
%changelog