summaryrefslogtreecommitdiff
blob: 0a379d83d24c8a8ead0fb71c722d6aad3ded21aa (plain)
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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/ansible/ansible-0.7.1.ebuild,v 1.1 2012/10/21 14:48:33 pinkbyte Exp $

EAPI="4"

PYTHON_COMPAT="python2_6 python2_7"

inherit distutils

DESCRIPTION="Radically simple deployment, model-driven configuration management, and command execution framework"
HOMEPAGE="http://ansible.github.com/"
SRC_URI="mirror://github/ansible/${PN}/${P}.tar.gz"

KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3"
SLOT="0"
IUSE="examples paramiko +sudo"

# Stable version fails almost all quality tests
RESTRICT="test"

DEPEND=""
RDEPEND="
	dev-python/jinja
	dev-python/pyyaml
	paramiko? ( dev-python/paramiko )
	!paramiko? ( virtual/ssh )
	sudo? ( app-admin/sudo )
"

src_install() {
	distutils_src_install

	dodir /usr/share/ansible
	insinto /usr/share/ansible
	doins library/*

	doman docs/man/man1/*.1
	if use examples; then
		dodoc -r examples
		docompress -x /usr/share/doc/${P}/examples
	fi

	newenvd "${FILESDIR}"/${PN}.env 95ansible
	dodir /etc/ansible
	insinto /etc/ansible
	doins examples/ansible.cfg examples/hosts
}

pkg_postinst() {
	distutils_pkg_postinst

	einfo "You have to create hosts file for user:"
	einfo "		echo \"127.0.0.1\" > ~/ansible_hosts"
	einfo "or global:"
	einfo "		echo \"127.0.0.1\" > /etc/ansible/hosts"
	einfo ""
	einfo "More info on http://ansible.github.com/gettingstarted.html"
}