Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,14 +1,13 @@
# $NetBSD: Makefile,v 1.14 2015/06/25 13:21:03 jperkin Exp $
# $NetBSD: Makefile,v 1.19 2016/07/09 13:04:05 wiz Exp $
DISTNAME= ansible-1.6.10
PKGREVISION= 1
#PKGNAME= ${PYPKGPREFIX}-${DISTNAME} # XXX: for when package is py3x-ready
DISTNAME= ansible-1.9.4
PKGREVISION= 2
#PKGNAME= ${PYPKGPREFIX}-${DISTNAME} # XXX: for when package is py3x-ready
CATEGORIES= python sysutils
MASTER_SITES= http://releases.ansible.com/ansible/
MASTER_SITES+= https://pypi.python.org/packages/source/a/ansible/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://ansibleworks.com/
HOMEPAGE= http://ansible.com/
COMMENT= SSH-based configuration management, deployment, and task execution
LICENSE= gnu-gpl-v3
@@ -20,32 +19,55 @@ DEPENDS+= ${PYPKGPREFIX}-crypto>=2.6:../../security/py-crypto
USE_TOOLS+= gmake
EGDIR= ${PREFIX}/share/examples/ansible
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= pre-configure
SUBST_FILES.prefix+= examples/ansible.cfg lib/ansible/callbacks.py
SUBST_FILES.prefix+= lib/ansible/constants.py library/packaging/pkgin
SUBST_MESSAGE.prefix= Fixing PREFIX path.
SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},"
SUBST_SED.prefix+= -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},"
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= pre-configure
SUBST_FILES.prefix+= docs/man/man1/ansible.1
SUBST_FILES.prefix+= docs/man/man1/ansible.1.asciidoc.in
SUBST_FILES.prefix+= docs/man/man1/ansible-galaxy.1
SUBST_FILES.prefix+= docs/man/man1/ansible-galaxy.1.asciidoc.in
SUBST_FILES.prefix+= docs/man/man1/ansible-playbook.1
SUBST_FILES.prefix+= docs/man/man1/ansible-playbook.1.asciidoc.in
SUBST_FILES.prefix+= examples/ansible.cfg examples/hosts
SUBST_FILES.prefix+= lib/ansible/constants.py lib/ansible/callbacks.py
SUBST_FILES.prefix+= lib/ansible/modules/core/system/ping.py
SUBST_FILES.prefix+= lib/ansible/modules/core/system/setup.py
SUBST_FILES.prefix+= lib/ansible/modules/extras/database/misc/riak.py
SUBST_FILES.prefix+= lib/ansible/modules/extras/monitoring/nagios.py
SUBST_FILES.prefix+= lib/ansible/modules/extras/packaging/os/pkgin.py
SUBST_FILES.prefix+= plugins/README.md plugins/inventory/cobbler.py
SUBST_FILES.prefix+= plugins/inventory/collins.py
SUBST_MESSAGE.prefix= Fixing PREFIX path.
SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},"
SUBST_SED.prefix+= -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},"
SUBST_CLASSES+= pythonbin
SUBST_STAGE.pythonbin= pre-configure
SUBST_FILES.pythonbin= Makefile
SUBST_MESSAGE.pythonbin= Fixing path to PYTHONBIN.
SUBST_SED.pythonbin= -e "s,PYTHON=python,PYTHON=${PYTHONBIN},"
SUBST_CLASSES+= pythonbin
SUBST_STAGE.pythonbin= pre-configure
SUBST_FILES.pythonbin= Makefile
SUBST_MESSAGE.pythonbin= Fixing path to PYTHONBIN.
SUBST_SED.pythonbin= -e "s,PYTHON=python,PYTHON=${PYTHONBIN},"
PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # py-paramiko
PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # py-paramiko
REPLACE_PYTHON+= lib/ansible/runner/action_plugins/synchronize.py
REPLACE_PYTHON+= lib/ansible/utils/module_docs.py
REPLACE_PYTHON= lib/ansible/runner/action_plugins/synchronize.py
REPLACE_PYTHON+= lib/ansible/utils/module_docs.py
MANPAGES= ansible-doc.1 ansible-pull.1 ansible-galaxy.1 ansible-vault.1
MANPAGES+= ansible-playbook.1 ansible.1
MANPAGES= ansible-doc.1 ansible-pull.1 ansible-galaxy.1 ansible-vault.1
MANPAGES+= ansible-playbook.1 ansible.1
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKG_SYSCONFDIR}/ansible
INSTALLATION_DIRS+= ${EGDIR}/playbooks
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKG_SYSCONFDIR}/ansible
INSTALLATION_DIRS+= ${EGDIR}/playbooks
INSTALLATION_DIRS+= share/ansible/roles
CHECK_INTERPRETER_SKIP= share/ansible/*
CHECK_INTERPRETER_SKIP= share/ansible/*
MAKE_DIRS= ${PKG_SYSCONFDIR}/ansible ${PREFIX}/share/ansible
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/action_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/callback_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/connection_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/lookup_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/vars_plugins
MAKE_DIRS+= ${PREFIX}/share/ansible/ansible_plugins/filter_plugins
pre-install:
find ${WRKSRC} -name \*.orig -exec rm {} \;
@@ -53,7 +75,7 @@ pre-install:
post-install:
.for f in ${MANPAGES}
${INSTALL_MAN} ${WRKSRC}/docs/man/man1/${f} \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
.endfor
.for f in ansible.cfg hosts
${INSTALL_DATA} ${WRKSRC}/examples/${f} ${DESTDIR}/${EGDIR}

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,23 @@
$NetBSD: distinfo,v 1.8 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: distinfo,v 1.11 2016/02/18 09:24:25 he Exp $
SHA1 (ansible-1.6.10.tar.gz) = 35d4af5beaff73de339442962da286bd3d7bacf4
RMD160 (ansible-1.6.10.tar.gz) = 2e9160769d06b14fcd4446a8337c5ef3447139bc
Size (ansible-1.6.10.tar.gz) = 654605 bytes
SHA1 (patch-examples_ansible.cfg) = aa743238d77edc4abfeddae69456067a53f6afeb
SHA1 (patch-lib_ansible_callbacks.py) = 786a30966784b2c0bbf749cb48786f50d42c8894
SHA1 (patch-lib_ansible_constants.py) = 170f57a2f651c4fd1678a8ad695ce1848c0b7282
SHA1 (patch-lib_ansible_module__utils_facts.py) = b44b9d03be1e30f5a2590100a62853516700fbd2
SHA1 (patch-library-system-ping) = 11be10c2c6617b48dba54823ead462628702708b
SHA1 (patch-library_database_riak) = cffae39d5a5e591938818655b78729a8e39084f1
SHA1 (patch-library_monitoring_nagios) = 7e40fb967bbb03fb52d0478a8d2caeb213e2fb7f
SHA1 (patch-library_packaging_pkgin) = 0dcc1699822251b7cc69db60d286e71964a99e0c
SHA1 (patch-library_system_setup) = d19520ddfa5f69f281fe18ccc9a31a2f6fb30d86
SHA1 (ansible-1.9.4.tar.gz) = f71f451d96239d08396d20fff2d9b8840426f714
RMD160 (ansible-1.9.4.tar.gz) = a88a7a1a19a82e6ca17ca77ae8d64a428cf37fe8
Size (ansible-1.9.4.tar.gz) = 937120 bytes
SHA1 (patch-docs_man_man1_ansible) = af150377f41d2feb239111346fc5d3101aa8bcea
SHA1 (patch-docs_man_man1_ansible-asciidoc) = 6c2b4eae3d8213d8ee0870727003bb128df44f10
SHA1 (patch-docs_man_man1_ansible-galaxy) = fa8e683620d53d81a88afe7446bef96071aa0edd
SHA1 (patch-docs_man_man1_ansible-galaxy-asciidoc) = e1a699f7b23d373405a2f18db6658c1ca50fc7d9
SHA1 (patch-docs_man_man1_ansible-playbook) = ca06a883d02f28895ad5ae9392f47e4024c6ec06
SHA1 (patch-docs_man_man1_ansible-playbook-asciidoc) = ac1d24661de7d6292252ce696b17f7317b2c43df
SHA1 (patch-examples_ansible) = f29fedf979a7ef0255d88d6e593eb84ca92fa3de
SHA1 (patch-examples_hosts) = ed21ed3f6f3db7d4ec9cd273e15adf075cec953d
SHA1 (patch-lib_ansible_callbacks) = bdcec47047b5361012472f6276df21618cc664bb
SHA1 (patch-lib_ansible_constants) = 59b0cb0e666280ebc453399d20d10ba4ad621066
SHA1 (patch-lib_ansible_modules_core_system_ping) = 1b91dbdb74e8cfc5e0bf99628e5ebb4bbd54dead
SHA1 (patch-lib_ansible_modules_core_system_setup) = a9a92a4a8786e0f96155cbd6d4d7b459d7728f0c
SHA1 (patch-lib_ansible_modules_extras_database_misc_riak) = 26fcb21fe56613a151913398c677d2fdcdaa3703
SHA1 (patch-lib_ansible_modules_extras_monitoring_nagios) = 0af8b51bc5e34dbb516a3b0be1c8670ea7c863b6
SHA1 (patch-lib_ansible_modules_extras_packaging_os_pkgin) = a8e2be00ff309be676435b7333e9b9ceebaba810
SHA1 (patch-plugins_README) = 05039fb081fce16754404adf746ef9594ef9f701
SHA1 (patch-plugins_inventory_cobbler) = bbc1a6c48d65229091d6c247e27ee28fe374e731
SHA1 (patch-plugins_inventory_collins) = 8eccebae0ea739d890696d27c663c8c65e8b8832

View File

@@ -0,0 +1,39 @@
$NetBSD: patch-docs_man_man1_ansible,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible.1.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible.1
@@ -53,7 +53,7 @@ Verbose mode, more output from successfu
The
\fIPATH\fR
to the inventory hosts file, which defaults to
-\fI/etc/ansible/hosts\fR\&.
+\fI@PKG_SYSCONFDIR@/ansible/hosts\fR\&.
.RE
.PP
\fB\-f\fR \fINUM\fR, \fB\-\-forks=\fR\fINUM\fR
@@ -79,7 +79,7 @@ Execute the module called
The
\fIDIRECTORY\fR
search path to load modules from\&. The default is
-\fI/usr/share/ansible\fR\&. This can also be set with the ANSIBLE_LIBRARY environment variable\&.
+\fI@PREFIX@/share/ansible\fR\&. This can also be set with the ANSIBLE_LIBRARY environment variable\&.
.RE
.PP
\fB\-a\fR \*(Aq\fIARGUMENTS\fR\*(Aq, \fB\-\-args=\fR\*(Aq\fIARGUMENTS\fR\*(Aq
@@ -182,11 +182,11 @@ Ansible stores the hosts it can potentia
Ranges of hosts are also supported\&. For more information and additional options, see the documentation on http://docs\&.ansible\&.com/\&.
.SH "FILES"
.sp
-/etc/ansible/hosts \(em Default inventory file
+@PKG_SYSCONFDIR@/ansible/hosts \(em Default inventory file
.sp
-/usr/share/ansible/ \(em Default module library
+@PREFIX@/share/ansible/ \(em Default module library
.sp
-/etc/ansible/ansible\&.cfg \(em Config file, used if present
+@PKG_SYSCONFDIR@/ansible/ansible\&.cfg \(em Config file, used if present
.sp
~/\&.ansible\&.cfg \(em User config file, overrides the default config if present
.SH "ENVIRONMENT"

View File

@@ -0,0 +1,39 @@
$NetBSD: patch-docs_man_man1_ansible-asciidoc,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible.1.asciidoc.in.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible.1.asciidoc.in
@@ -41,7 +41,7 @@ up to three times for more output.
*-i* 'PATH', *--inventory=*'PATH'::
-The 'PATH' to the inventory hosts file, which defaults to '/etc/ansible/hosts'.
+The 'PATH' to the inventory hosts file, which defaults to '@PKG_SYSCONFDIR@/ansible/hosts'.
*-f* 'NUM', *--forks=*'NUM'::
@@ -61,7 +61,7 @@ Execute the module called 'NAME'.
*-M* 'DIRECTORY', *--module-path=*'DIRECTORY'::
The 'DIRECTORY' search path to load modules from. The default is
-'/usr/share/ansible'. This can also be set with the ANSIBLE_LIBRARY
+'@PREFIX@/share/ansible'. This can also be set with the ANSIBLE_LIBRARY
environment variable.
*-a* \'_ARGUMENTS_', *--args=*\'_ARGUMENTS_'::
@@ -140,11 +140,11 @@ additional options, see the documentatio
FILES
-----
-/etc/ansible/hosts -- Default inventory file
+@PKG_SYSCONFDIR@/ansible/hosts -- Default inventory file
-/usr/share/ansible/ -- Default module library
+@PREFIX@/share/ansible/ -- Default module library
-/etc/ansible/ansible.cfg -- Config file, used if present
+@PKG_SYSCONFDIR@/ansible/ansible.cfg -- Config file, used if present
~/.ansible.cfg -- User config file, overrides the default config if present

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-docs_man_man1_ansible-galaxy,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible-galaxy.1.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible-galaxy.1
@@ -109,7 +109,7 @@ The path to the directory containing you
\fBroles_path\fR
configured in your
\fBansible\&.cfg\fR
-file (/etc/ansible/roles if not configured)
+file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
.RE
.PP
\fB\-r\fR \fIROLE_FILE\fR, \fB\-\-role\-file=\fR\fIROLE_FILE\fR
@@ -130,7 +130,7 @@ The path to the directory containing you
\fBroles_path\fR
configured in your
\fBansible\&.cfg\fR
-file (/etc/ansible/roles if not configured)
+file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
.RE
.SH "INIT"
.sp
@@ -168,7 +168,7 @@ The path to the directory containing you
\fBroles_path\fR
configured in your
\fBansible\&.cfg\fR
-file (/etc/ansible/roles if not configured)
+file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
.RE
.SH "AUTHOR"
.sp

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-docs_man_man1_ansible-galaxy-asciidoc,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible-galaxy.1.asciidoc.in.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible-galaxy.1.asciidoc.in
@@ -74,7 +74,7 @@ Don't download roles listed as dependenc
*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::
The path to the directory containing your roles. The default is the *roles_path*
-configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)
+configured in your *ansible.cfg* file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
*-r* 'ROLE_FILE', *--role-file=*'ROLE_FILE'::
@@ -97,7 +97,7 @@ OPTIONS
*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::
The path to the directory containing your roles. The default is the *roles_path*
-configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)
+configured in your *ansible.cfg* file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
INIT
----
@@ -143,7 +143,7 @@ OPTIONS
*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::
The path to the directory containing your roles. The default is the *roles_path*
-configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)
+configured in your *ansible.cfg* file (@PKG_SYSCONFDIR@/ansible/roles if not configured)
AUTHOR

View File

@@ -0,0 +1,39 @@
$NetBSD: patch-docs_man_man1_ansible-playbook,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible-playbook.1.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible-playbook.1
@@ -53,7 +53,7 @@ Verbose mode, more output from successfu
The
\fIPATH\fR
to the inventory hosts file, which defaults to
-\fI/etc/ansible/hosts\fR\&.
+\fI@PKG_SYSCONFDIR@/ansible/hosts\fR\&.
.RE
.PP
\fB\-M\fR \fIDIRECTORY\fR, \fB\-\-module\-path=\fR\fIDIRECTORY\fR
@@ -61,7 +61,7 @@ to the inventory hosts file, which defau
The
\fIDIRECTORY\fR
search path to load modules from\&. The default is
-\fI/usr/share/ansible\fR\&. This can also be set with the ANSIBLE_LIBRARY environment variable\&.
+\fI@PREFIX@/share/ansible\fR\&. This can also be set with the ANSIBLE_LIBRARY environment variable\&.
.RE
.PP
\fB\-e\fR \fIVARS\fR, \fB\-\-extra\-vars=\fR\fIVARS\fR
@@ -161,11 +161,11 @@ ANSIBLE_HOSTS \(em Override the default
ANSIBLE_LIBRARY \(em Override the default ansible module library path
.SH "FILES"
.sp
-/etc/ansible/hosts \(em Default inventory file
+@PKG_SYSCONFDIR@/ansible/hosts \(em Default inventory file
.sp
-/usr/share/ansible/ \(em Default module library
+@PREFIX@/share/ansible/ \(em Default module library
.sp
-/etc/ansible/ansible\&.cfg \(em Config file, used if present
+@PKG_SYSCONFDIR@/ansible/ansible\&.cfg \(em Config file, used if present
.sp
~/\&.ansible\&.cfg \(em User config file, overrides the default config if present
.SH "AUTHOR"

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-docs_man_man1_ansible-playbook-asciidoc,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- docs/man/man1/ansible-playbook.1.asciidoc.in.orig 2015-06-25 20:39:08.000000000 +0000
+++ docs/man/man1/ansible-playbook.1.asciidoc.in
@@ -42,13 +42,13 @@ up to three times for more output.
*-i* 'PATH', *--inventory=*'PATH'::
The 'PATH' to the inventory hosts file, which defaults to
-'/etc/ansible/hosts'.
+'@PKG_SYSCONFDIR@/ansible/hosts'.
*-M* 'DIRECTORY', *--module-path=*'DIRECTORY'::
The 'DIRECTORY' search path to load modules from. The default is
-'/usr/share/ansible'. This can also be set with the ANSIBLE_LIBRARY
+'@PREFIX@/share/ansible'. This can also be set with the ANSIBLE_LIBRARY
environment variable.
*-e* 'VARS', *--extra-vars=*'VARS'::
@@ -140,11 +140,11 @@ ANSIBLE_LIBRARY -- Override the default
FILES
-----
-/etc/ansible/hosts -- Default inventory file
+@PKG_SYSCONFDIR@/ansible/hosts -- Default inventory file
-/usr/share/ansible/ -- Default module library
+@PREFIX@/share/ansible/ -- Default module library
-/etc/ansible/ansible.cfg -- Config file, used if present
+@PKG_SYSCONFDIR@/ansible/ansible.cfg -- Config file, used if present
~/.ansible.cfg -- User config file, overrides the default config if present

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-examples_ansible.cfg,v 1.4 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: patch-examples_ansible,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- examples/ansible.cfg.orig 2014-07-25 20:48:49.000000000 +0000
--- examples/ansible.cfg.orig 2015-06-25 20:39:08.000000000 +0000
+++ examples/ansible.cfg
@@ -4,15 +4,15 @@
# nearly all parameters can be overridden in ansible-playbook
@@ -16,15 +16,33 @@ Fix hardcoded paths to be replaced with SUBST framework.
# some basic default values...
-hostfile = /etc/ansible/hosts
-library = /usr/share/ansible
+hostfile = @PKG_SYSCONFDIR@/ansible/hosts
+library = @PREFIX@/share/ansible
-inventory = /etc/ansible/hosts
-#library = /usr/share/my_modules/
+inventory = @PKG_SYSCONFDIR@/ansible/hosts
+#library = @PREFIX@/share/my_modules/
remote_tmp = $HOME/.ansible/tmp
pattern = *
forks = 5
@@ -103,12 +103,12 @@ ansible_managed = Ansible managed: {file
#deprecation_warnings = True
@@ -33,7 +33,7 @@ module_lang = C
gathering = implicit
# additional paths to search for roles in, colon separated
-#roles_path = /etc/ansible/roles
+#roles_path = @PKG_SYSCONFDIR@/ansible/roles
# uncomment this to disable SSH key host checking
#host_key_checking = False
@@ -55,7 +55,7 @@ timeout = 10
# if so defined, consider logrotate
#log_path = /var/log/ansible.log
-# default module name for /usr/bin/ansible
+# default module name for @PREFIX@/bin/ansible
#module_name = command
# use this shell for commands executed under sudo
@@ -112,12 +112,12 @@ ansible_managed = Ansible managed: {file
# set plugin path directories here, separate with colons
-action_plugins = /usr/share/ansible_plugins/action_plugins
@@ -40,5 +58,5 @@ Fix hardcoded paths to be replaced with SUBST framework.
+vars_plugins = @PREFIX@/share/ansible_plugins/vars_plugins
+filter_plugins = @PREFIX@/share/ansible_plugins/filter_plugins
# don't like cows? that's unfortunate.
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
# by default callbacks are not loaded for /bin/ansible, enable this if you
# want, for example, a notification or logging callback to also apply to

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-examples_hosts,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- examples/hosts.orig 2015-06-25 20:39:08.000000000 +0000
+++ examples/hosts
@@ -1,6 +1,6 @@
# This is the default ansible 'hosts' file.
#
-# It should live in /etc/ansible/hosts
+# It should live in @PKG_SYSCONFDIR@/ansible/hosts
#
# - Comments begin with the '#' character
# - Blank lines are ignored

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-lib_ansible_callbacks,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- lib/ansible/callbacks.py.orig 2015-06-25 20:39:08.000000000 +0000
+++ lib/ansible/callbacks.py
@@ -58,9 +58,9 @@ def get_cowsay_info():
cowsay = "/usr/bin/cowsay"
elif os.path.exists("/usr/games/cowsay"):
cowsay = "/usr/games/cowsay"
- elif os.path.exists("/usr/local/bin/cowsay"):
+ elif os.path.exists("@PREFIX@/bin/cowsay"):
# BSD path for cowsay
- cowsay = "/usr/local/bin/cowsay"
+ cowsay = "@PREFIX@/bin/cowsay"
elif os.path.exists("/opt/local/bin/cowsay"):
# MacPorts path for cowsay
cowsay = "/opt/local/bin/cowsay"
@@ -370,10 +370,10 @@ class DefaultRunnerCallbacks(object):
########################################################################
class CliRunnerCallbacks(DefaultRunnerCallbacks):
- ''' callbacks for use by /usr/bin/ansible '''
+ ''' callbacks for use by @PREFIX@/bin/ansible '''
def __init__(self):
- # set by /usr/bin/ansible later
+ # set by @PREFIX@/bin/ansible later
self.options = None
self._async_notified = {}
@@ -440,7 +440,7 @@ class CliRunnerCallbacks(DefaultRunnerCa
########################################################################
class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
- ''' callbacks used for Runner() from /usr/bin/ansible-playbook '''
+ ''' callbacks used for Runner() from @PREFIX@/bin/ansible-playbook '''
def __init__(self, stats, verbose=None):
@@ -590,7 +590,7 @@ class PlaybookRunnerCallbacks(DefaultRun
########################################################################
class PlaybookCallbacks(object):
- ''' playbook.py callbacks used by /usr/bin/ansible-playbook '''
+ ''' playbook.py callbacks used by @PREFIX@/bin/ansible-playbook '''
def __init__(self, verbose=False):

View File

@@ -1,18 +0,0 @@
$NetBSD: patch-lib_ansible_callbacks.py,v 1.5 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- lib/ansible/callbacks.py.orig 2014-07-25 20:48:49.000000000 +0000
+++ lib/ansible/callbacks.py
@@ -55,9 +55,9 @@ def get_cowsay_info():
cowsay = "/usr/bin/cowsay"
elif os.path.exists("/usr/games/cowsay"):
cowsay = "/usr/games/cowsay"
- elif os.path.exists("/usr/local/bin/cowsay"):
+ elif os.path.exists("@PREFIX@/bin/cowsay"):
# BSD path for cowsay
- cowsay = "/usr/local/bin/cowsay"
+ cowsay = "@PREFIX@/bin/cowsay"
elif os.path.exists("/opt/local/bin/cowsay"):
# MacPorts path for cowsay
cowsay = "/opt/local/bin/cowsay"

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-lib_ansible_constants,v 1.2 2016/02/18 09:24:25 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
Move the ansible/roles tree out from under any etc/ directory to share/
--- lib/ansible/constants.py.orig 2015-06-25 20:39:08.000000000 +0000
+++ lib/ansible/constants.py
@@ -67,7 +67,7 @@ def load_config_file():
path0 = os.path.expanduser(path0)
path1 = os.getcwd() + "/ansible.cfg"
path2 = os.path.expanduser("~/.ansible.cfg")
- path3 = "/etc/ansible/ansible.cfg"
+ path3 = "@PKG_SYSCONFDIR@/ansible/ansible.cfg"
for path in [path0, path1, path2, path3]:
if path is not None and os.path.exists(path):
@@ -98,9 +98,9 @@ YAML_FILENAME_EXTENSIONS = [ "", ".yml",
DEFAULTS='defaults'
# configurable things
-DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'inventory', 'ANSIBLE_INVENTORY', get_config(p, DEFAULTS,'hostfile','ANSIBLE_HOSTS', '/etc/ansible/hosts')))
+DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'inventory', 'ANSIBLE_INVENTORY', get_config(p, DEFAULTS,'hostfile','ANSIBLE_HOSTS', '@PKG_SYSCONFDIR@/ansible/hosts')))
DEFAULT_MODULE_PATH = get_config(p, DEFAULTS, 'library', 'ANSIBLE_LIBRARY', None)
-DEFAULT_ROLES_PATH = shell_expand_path(get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '/etc/ansible/roles'))
+DEFAULT_ROLES_PATH = shell_expand_path(get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '@PREFIX@/share/ansible/roles'))
DEFAULT_REMOTE_TMP = get_config(p, DEFAULTS, 'remote_tmp', 'ANSIBLE_REMOTE_TEMP', '$HOME/.ansible/tmp')
DEFAULT_MODULE_NAME = get_config(p, DEFAULTS, 'module_name', None, 'command')
DEFAULT_PATTERN = get_config(p, DEFAULTS, 'pattern', None, '*')
@@ -152,13 +152,13 @@ DEFAULT_BECOME_EXE = None
#DEFAULT_BECOME_FLAGS = get_config(p, DEFAULTS, 'become_flags', 'ANSIBLE_BECOME_FLAGS',DEFAULT_SUDO_FLAGS if DEFAULT_SUDO else DEFAULT_SU_FLAGS if DEFAULT_SU else '-H')
-DEFAULT_ACTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'action_plugins', 'ANSIBLE_ACTION_PLUGINS', '~/.ansible/plugins/action_plugins:/usr/share/ansible_plugins/action_plugins')
-DEFAULT_CACHE_PLUGIN_PATH = get_config(p, DEFAULTS, 'cache_plugins', 'ANSIBLE_CACHE_PLUGINS', '~/.ansible/plugins/cache_plugins:/usr/share/ansible_plugins/cache_plugins')
-DEFAULT_CALLBACK_PLUGIN_PATH = get_config(p, DEFAULTS, 'callback_plugins', 'ANSIBLE_CALLBACK_PLUGINS', '~/.ansible/plugins/callback_plugins:/usr/share/ansible_plugins/callback_plugins')
-DEFAULT_CONNECTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'connection_plugins', 'ANSIBLE_CONNECTION_PLUGINS', '~/.ansible/plugins/connection_plugins:/usr/share/ansible_plugins/connection_plugins')
-DEFAULT_LOOKUP_PLUGIN_PATH = get_config(p, DEFAULTS, 'lookup_plugins', 'ANSIBLE_LOOKUP_PLUGINS', '~/.ansible/plugins/lookup_plugins:/usr/share/ansible_plugins/lookup_plugins')
-DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', 'ANSIBLE_VARS_PLUGINS', '~/.ansible/plugins/vars_plugins:/usr/share/ansible_plugins/vars_plugins')
-DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '~/.ansible/plugins/filter_plugins:/usr/share/ansible_plugins/filter_plugins')
+DEFAULT_ACTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'action_plugins', 'ANSIBLE_ACTION_PLUGINS', '~/.ansible/plugins/action_plugins:@PREFIX@/share/ansible_plugins/action_plugins')
+DEFAULT_CACHE_PLUGIN_PATH = get_config(p, DEFAULTS, 'cache_plugins', 'ANSIBLE_CACHE_PLUGINS', '~/.ansible/plugins/cache_plugins:@PREFIX@/share/ansible_plugins/cache_plugins')
+DEFAULT_CALLBACK_PLUGIN_PATH = get_config(p, DEFAULTS, 'callback_plugins', 'ANSIBLE_CALLBACK_PLUGINS', '~/.ansible/plugins/callback_plugins:@PREFIX@/share/ansible_plugins/callback_plugins')
+DEFAULT_CONNECTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'connection_plugins', 'ANSIBLE_CONNECTION_PLUGINS', '~/.ansible/plugins/connection_plugins:@PREFIX@/share/ansible_plugins/connection_plugins')
+DEFAULT_LOOKUP_PLUGIN_PATH = get_config(p, DEFAULTS, 'lookup_plugins', 'ANSIBLE_LOOKUP_PLUGINS', '~/.ansible/plugins/lookup_plugins:@PREFIX@/share/ansible_plugins/lookup_plugins')
+DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', 'ANSIBLE_VARS_PLUGINS', '~/.ansible/plugins/vars_plugins:@PREFIX@/share/ansible_plugins/vars_plugins')
+DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '~/.ansible/plugins/filter_plugins:@PREFIX@/share/ansible_plugins/filter_plugins')
CACHE_PLUGIN = get_config(p, DEFAULTS, 'fact_caching', 'ANSIBLE_CACHE_PLUGIN', 'memory')
CACHE_PLUGIN_CONNECTION = get_config(p, DEFAULTS, 'fact_caching_connection', 'ANSIBLE_CACHE_PLUGIN_CONNECTION', None)

View File

@@ -1,52 +0,0 @@
$NetBSD: patch-lib_ansible_constants.py,v 1.7 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- lib/ansible/constants.py.orig 2014-07-25 20:48:49.000000000 +0000
+++ lib/ansible/constants.py
@@ -67,7 +67,7 @@ def load_config_file():
path0 = os.path.expanduser(path0)
path1 = os.getcwd() + "/ansible.cfg"
path2 = os.path.expanduser("~/.ansible.cfg")
- path3 = "/etc/ansible/ansible.cfg"
+ path3 = "@PKG_SYSCONFDIR@/ansible/ansible.cfg"
for path in [path0, path1, path2, path3]:
if path is not None and os.path.exists(path):
@@ -92,7 +92,7 @@ if getattr(sys, "real_prefix", None):
# in a virtualenv
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
else:
- DIST_MODULE_PATH = '/usr/share/ansible/'
+ DIST_MODULE_PATH = '@PREFIX@/share/ansible/'
# check all of these extensions when looking for yaml files for things like
# group variables -- really anything we can load
@@ -102,7 +102,7 @@ YAML_FILENAME_EXTENSIONS = [ "", ".yml",
DEFAULTS='defaults'
# configurable things
-DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'hostfile', 'ANSIBLE_HOSTS', '/etc/ansible/hosts'))
+DEFAULT_HOST_LIST = shell_expand_path(get_config(p, DEFAULTS, 'hostfile', 'ANSIBLE_HOSTS', '@PKG_SYSCONFDIR@/ansible/hosts'))
DEFAULT_MODULE_PATH = get_config(p, DEFAULTS, 'library', 'ANSIBLE_LIBRARY', DIST_MODULE_PATH)
DEFAULT_ROLES_PATH = get_config(p, DEFAULTS, 'roles_path', 'ANSIBLE_ROLES_PATH', '/etc/ansible/roles')
DEFAULT_REMOTE_TMP = shell_expand_path(get_config(p, DEFAULTS, 'remote_tmp', 'ANSIBLE_REMOTE_TEMP', '$HOME/.ansible/tmp'))
@@ -138,12 +138,12 @@ DEFAULT_SU_USER = get_config(p
DEFAULT_ASK_SU_PASS = get_config(p, DEFAULTS, 'ask_su_pass', 'ANSIBLE_ASK_SU_PASS', False, boolean=True)
DEFAULT_GATHERING = get_config(p, DEFAULTS, 'gathering', 'ANSIBLE_GATHERING', 'implicit').lower()
-DEFAULT_ACTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'action_plugins', 'ANSIBLE_ACTION_PLUGINS', '/usr/share/ansible_plugins/action_plugins')
-DEFAULT_CALLBACK_PLUGIN_PATH = get_config(p, DEFAULTS, 'callback_plugins', 'ANSIBLE_CALLBACK_PLUGINS', '/usr/share/ansible_plugins/callback_plugins')
-DEFAULT_CONNECTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'connection_plugins', 'ANSIBLE_CONNECTION_PLUGINS', '/usr/share/ansible_plugins/connection_plugins')
-DEFAULT_LOOKUP_PLUGIN_PATH = get_config(p, DEFAULTS, 'lookup_plugins', 'ANSIBLE_LOOKUP_PLUGINS', '/usr/share/ansible_plugins/lookup_plugins')
-DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', 'ANSIBLE_VARS_PLUGINS', '/usr/share/ansible_plugins/vars_plugins')
-DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '/usr/share/ansible_plugins/filter_plugins')
+DEFAULT_ACTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'action_plugins', 'ANSIBLE_ACTION_PLUGINS', '@PREFIX@/share/ansible_plugins/action_plugins')
+DEFAULT_CALLBACK_PLUGIN_PATH = get_config(p, DEFAULTS, 'callback_plugins', 'ANSIBLE_CALLBACK_PLUGINS', '@PREFIX@/share/ansible_plugins/callback_plugins')
+DEFAULT_CONNECTION_PLUGIN_PATH = get_config(p, DEFAULTS, 'connection_plugins', 'ANSIBLE_CONNECTION_PLUGINS', '@PREFIX@/share/ansible_plugins/connection_plugins')
+DEFAULT_LOOKUP_PLUGIN_PATH = get_config(p, DEFAULTS, 'lookup_plugins', 'ANSIBLE_LOOKUP_PLUGINS', '@PREFIX@/share/ansible_plugins/lookup_plugins')
+DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', 'ANSIBLE_VARS_PLUGINS', '@PREFIX@/share/ansible_plugins/vars_plugins')
+DEFAULT_FILTER_PLUGIN_PATH = get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '@PREFIX@/share/ansible_plugins/filter_plugins')
DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_path', 'ANSIBLE_LOG_PATH', ''))
ANSIBLE_FORCE_COLOR = get_config(p, DEFAULTS, 'force_color', 'ANSIBLE_FORCE_COLOR', None, boolean=True)

View File

@@ -1,30 +0,0 @@
$NetBSD: patch-lib_ansible_module__utils_facts.py,v 1.1 2015/06/25 13:21:03 jperkin Exp $
Handle sysctl(8) behaviour in OS X 10.10, using patch from
https://github.com/ansible/ansible/pull/8171/files
--- lib/ansible/module_utils/facts.py.orig 2014-07-25 20:48:49.000000000 +0000
+++ lib/ansible/module_utils/facts.py
@@ -1361,7 +1361,9 @@ class Darwin(Hardware):
return system_profile
def get_mac_facts(self):
- self.facts['model'] = self.sysctl['hw.model']
+ rc, out, err = module.run_command("sysctl hw.model")
+ if rc == 0:
+ self.facts['model'] = out.splitlines()[-1].split()[1]
self.facts['osversion'] = self.sysctl['kern.osversion']
self.facts['osrevision'] = self.sysctl['kern.osrevision']
@@ -1376,7 +1378,10 @@ class Darwin(Hardware):
def get_memory_facts(self):
self.facts['memtotal_mb'] = long(self.sysctl['hw.memsize']) / 1024 / 1024
- self.facts['memfree_mb'] = long(self.sysctl['hw.usermem']) / 1024 / 1024
+ rc, out, err = module.run_command("sysctl hw.usermem")
+ if rc == 0:
+ self.facts['memfree_mb'] = long(out.splitlines()[-1].split()[1]) / 1024 / 1024
+
class Network(Facts):
"""

View File

@@ -1,15 +1,15 @@
$NetBSD: patch-library-system-ping,v 1.3 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: patch-lib_ansible_modules_core_system_ping,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- library/system/ping.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/system/ping
--- lib/ansible/modules/core/system/ping.py.orig 2015-06-25 20:39:14.000000000 +0000
+++ lib/ansible/modules/core/system/ping.py
@@ -27,7 +27,7 @@ short_description: Try to connect to hos
description:
- A trivial test module, this module always returns C(pong) on successful
contact. It does not make sense in playbooks, but it is useful from
- C(/usr/bin/ansible)
+ C(@PREFIX@/ansible)
+ C(@PREFIX@/bin/ansible)
options: {}
author: Michael DeHaan
'''

View File

@@ -1,9 +1,9 @@
$NetBSD: patch-library_system_setup,v 1.3 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: patch-lib_ansible_modules_core_system_setup,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- library/system/setup.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/system/setup
--- lib/ansible/modules/core/system/setup.py.orig 2015-06-25 20:39:14.000000000 +0000
+++ lib/ansible/modules/core/system/setup.py
@@ -42,7 +42,7 @@ options:
description:
- This module is automatically called by playbooks to gather useful

View File

@@ -1,9 +1,18 @@
$NetBSD: patch-library_database_riak,v 1.3 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: patch-lib_ansible_modules_extras_database_misc_riak,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- library/database/riak.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/database/riak
--- lib/ansible/modules/extras/database/misc/riak.py.orig 2015-06-25 20:39:17.000000000 +0000
+++ lib/ansible/modules/extras/database/misc/riak.py
@@ -38,7 +38,7 @@ options:
description:
- The path to the riak configuration directory
required: false
- default: /etc/riak
+ default: @PKG_SYSCONFDIR@/riak
aliases: []
http_conn:
description:
@@ -118,7 +118,7 @@ def main():
argument_spec=dict(
command=dict(required=False, default=None, choices=[

View File

@@ -1,15 +1,15 @@
$NetBSD: patch-library_monitoring_nagios,v 1.3 2015/06/25 13:21:03 jperkin Exp $
$NetBSD: patch-lib_ansible_modules_extras_monitoring_nagios,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- library/monitoring/nagios.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/monitoring/nagios
--- lib/ansible/modules/extras/monitoring/nagios.py.orig 2015-06-25 20:39:17.000000000 +0000
+++ lib/ansible/modules/extras/monitoring/nagios.py
@@ -125,6 +125,8 @@ import os.path
def which_cmdfile():
locations = [
+ # pkgsrc - any OS
+ '@PKG_SYSCONFDIR@/nagios/nagios.cfg',
+ # pkgsrc - any OS
+ '@PKG_SYSCONFDIR@/nagios/nagios.cfg',
# rhel
'/etc/nagios/nagios.cfg',
# debian
@@ -26,8 +26,8 @@ Fix hardcoded paths to be replaced with SUBST framework.
'/usr/local/nagios/nagios.cfg',
'/opt/nagios/etc/nagios.cfg',
'/opt/nagios/nagios.cfg',
+ # pkgsrc - any OS
+ '@PKG_SYSCONFDIR@/icinga/icinga.cfg',
+ # icinga on pkgsrc - any OS
+ '@PKG_SYSCONFDIR@/icinga/icinga.cfg',
# icinga on debian/ubuntu
'/etc/icinga/icinga.cfg',
# icinga installed from source (default location)

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-lib_ansible_modules_extras_packaging_os_pkgin,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- lib/ansible/modules/extras/packaging/os/pkgin.py.orig 2015-08-19 13:22:23.000000000 +0000
+++ lib/ansible/modules/extras/packaging/os/pkgin.py
@@ -93,7 +93,10 @@ def query_package(module, pkgin_path, na
# '<' - installed but out of date
# '=' - installed and up to date
# '>' - installed but newer than the repository version
- pkgname_with_version, raw_state = out.split(' ')[0:2]
+ if len(out.split(';')) >= 3:
+ pkgname_with_version, raw_state = out.split(';')[0:2]
+ else:
+ pkgname_with_version, raw_state = out.split(' ')[0:2]
# Strip version
# (results in sth like 'gcc47-libs')
@@ -192,7 +195,7 @@ def main():
name = dict(aliases=["pkg"], required=True)),
supports_check_mode = True)
- pkgin_path = module.get_bin_path('pkgin', True, ['/opt/local/bin'])
+ pkgin_path = module.get_bin_path('pkgin', True, ['@PREFIX@/bin'])
p = module.params

View File

@@ -1,28 +0,0 @@
$NetBSD: patch-library_packaging_pkgin,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
Handle newer pkgin non-tty ';' delimited output.
--- library/packaging/pkgin.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/packaging/pkgin
@@ -87,7 +87,10 @@ def query_package(module, pkgin_path, na
# Strip description
# (results in sth. like 'gcc47-libs-4.7.2nb4')
- pkgname_with_version = out.split(' ')[0]
+ if len(out.split(';')) >= 3:
+ pkgname_with_version = out.split(';')[0]
+ else:
+ pkgname_with_version = out.split(' ')[0]
# Strip version
# (results in sth like 'gcc47-libs')
@@ -150,7 +153,7 @@ def main():
state = dict(default="present", choices=["present","absent"]),
name = dict(aliases=["pkg"], required=True)))
- pkgin_path = module.get_bin_path('pkgin', True, ['/opt/local/bin'])
+ pkgin_path = module.get_bin_path('pkgin', True, ['@PREFIX@/bin'])
p = module.params

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-plugins_README,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- plugins/README.md.orig 2015-08-19 12:07:33.000000000 +0000
+++ plugins/README.md
@@ -25,7 +25,7 @@ Inventory plugins allow you to store you
you like. Examples include discovering inventory from EC2 or pulling it from
Cobbler. These could also be used to interface with LDAP or database.
-chmod +x an inventory plugin and either name it /etc/ansible/hosts or use ansible
+chmod +x an inventory plugin and either name it @PKG_SYSCONFDIR@/ansible/hosts or use ansible
with -i to designate the path to the plugin.
contributions welcome

View File

@@ -0,0 +1,20 @@
$NetBSD: patch-plugins_inventory_cobbler,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- plugins/inventory/cobbler.py.orig 2015-06-25 20:39:08.000000000 +0000
+++ plugins/inventory/cobbler.py
@@ -4,11 +4,11 @@
Cobbler external inventory script
=================================
-Ansible has a feature where instead of reading from /etc/ansible/hosts
+Ansible has a feature where instead of reading from @PKG_SYSCONFDIR@/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
-To use this, copy this file over /etc/ansible/hosts and chmod +x the file.
+To use this, copy this file over @PKG_SYSCONFDIR@//ansible/hosts and chmod +x the file.
This, more or less, allows you to keep one central database containing
info about all of your managed instances.

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-plugins_inventory_collins,v 1.1 2016/02/17 20:31:45 he Exp $
Fix hardcoded paths to be replaced with SUBST framework.
--- plugins/inventory/collins.py.orig 2015-06-25 20:39:08.000000000 +0000
+++ plugins/inventory/collins.py
@@ -4,7 +4,7 @@
Collins external inventory script
=================================
-Ansible has a feature where instead of reading from /etc/ansible/hosts
+Ansible has a feature where instead of reading from @PKG_SYSCONFDIR@/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
@@ -25,7 +25,7 @@ Cobbler inventory script.
To use it, copy it to your repo and pass -i <collins script> to the ansible or
ansible-playbook command; if you'd like to use it by default, simply copy collins.ini
-to /etc/ansible and this script to /etc/ansible/hosts.
+to @PKG_SYSCONFDIR@/ansible and this script to @PKG_SYSCONFDIR@/ansible/hosts.
Alongside the options set in collins.ini, there are several environment variables
that will be used instead of the configured values if they are set: