summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhubertf <hubertf>2013-02-26 00:13:00 +0000
committerhubertf <hubertf>2013-02-26 00:13:00 +0000
commite3d1cc42b79e918c98e6eea2dffc5c5585e39bb2 (patch)
tree042c84a51fa7e1267b583bd9d0d2cbc83f991aec /sysutils
parent85b8b5375e9471c7702b504a3603876bd2094985 (diff)
downloadpkgsrc-e3d1cc42b79e918c98e6eea2dffc5c5585e39bb2.tar.gz
Add ansible-1.0:
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.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ansible/DESCR5
-rw-r--r--sysutils/ansible/Makefile42
-rw-r--r--sysutils/ansible/PLIST237
-rw-r--r--sysutils/ansible/distinfo17
-rw-r--r--sysutils/ansible/patches/patch-Makefile30
-rw-r--r--sysutils/ansible/patches/patch-lib_ansible_callbacks.py16
-rw-r--r--sysutils/ansible/patches/patch-lib_ansible_constants.py15
-rw-r--r--sysutils/ansible/patches/patch-library_lineinfile12
-rw-r--r--sysutils/ansible/patches/patch-library_mysql_db20
-rw-r--r--sysutils/ansible/patches/patch-library_ping13
-rw-r--r--sysutils/ansible/patches/patch-library_pkgin13
-rw-r--r--sysutils/ansible/patches/patch-library_raw13
-rw-r--r--sysutils/ansible/patches/patch-library_service70
-rw-r--r--sysutils/ansible/patches/patch-library_setup44
-rw-r--r--sysutils/ansible/patches/patch-library_slurp13
-rw-r--r--sysutils/ansible/patches/patch-library_virt13
16 files changed, 573 insertions, 0 deletions
diff --git a/sysutils/ansible/DESCR b/sysutils/ansible/DESCR
new file mode 100644
index 00000000000..d731fb1f3f6
--- /dev/null
+++ b/sysutils/ansible/DESCR
@@ -0,0 +1,5 @@
+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.
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
new file mode 100644
index 00000000000..9dff76384ce
--- /dev/null
+++ b/sysutils/ansible/Makefile
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+#
+
+DISTNAME= ansible-1.0
+CATEGORIES= sysutils
+MASTER_SITES= http://ansible.cc/releases/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://ansible.cc/
+COMMENT= SSH-based configuration management, deployment, and task execution system
+LICENSE= gnu-gpl-v3
+
+#USE_LANGUAGES= # none
+USE_TOOLS+= gmake
+
+REPLACE_PYTHON+=library/*
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_FILES.prefix= lib/ansible/constants.py
+SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},"
+
+SUBST_CLASSES+= localbase
+SUBST_STAGE.localbase= pre-configure
+SUBST_FILES.localbase= \
+ lib/ansible/callbacks.py \
+ library/mysql_db \
+ library/ping \
+ library/pkgin \
+ library/raw \
+ library/setup \
+ library/slurp \
+ library/virt
+SUBST_SED.localbase= -e "s,@LOCALBASE@,${LOCALBASE},"
+
+DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
+DEPENDS+= ${PYPKGPREFIX}-paramiko-[0-9]*:../../security/py-paramiko
+DEPENDS+= ${PYPKGPREFIX}-jinja2-[0-9]*:../../textproc/py-jinja2
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/distutils.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/ansible/PLIST b/sysutils/ansible/PLIST
new file mode 100644
index 00000000000..0a0e46ae32c
--- /dev/null
+++ b/sysutils/ansible/PLIST
@@ -0,0 +1,237 @@
+@comment $NetBSD: PLIST,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+bin/ansible
+bin/ansible-doc
+bin/ansible-playbook
+bin/ansible-pull
+${PYSITELIB}/${EGG_FILE}
+${PYSITELIB}/ansible/__init__.py
+${PYSITELIB}/ansible/__init__.pyc
+${PYSITELIB}/ansible/__init__.pyo
+${PYSITELIB}/ansible/callback_plugins/__init__.py
+${PYSITELIB}/ansible/callback_plugins/__init__.pyc
+${PYSITELIB}/ansible/callback_plugins/__init__.pyo
+${PYSITELIB}/ansible/callback_plugins/noop.py
+${PYSITELIB}/ansible/callback_plugins/noop.pyc
+${PYSITELIB}/ansible/callback_plugins/noop.pyo
+${PYSITELIB}/ansible/callbacks.py
+${PYSITELIB}/ansible/callbacks.pyc
+${PYSITELIB}/ansible/callbacks.pyo
+${PYSITELIB}/ansible/color.py
+${PYSITELIB}/ansible/color.pyc
+${PYSITELIB}/ansible/color.pyo
+${PYSITELIB}/ansible/constants.py
+${PYSITELIB}/ansible/constants.pyc
+${PYSITELIB}/ansible/constants.pyo
+${PYSITELIB}/ansible/errors.py
+${PYSITELIB}/ansible/errors.pyc
+${PYSITELIB}/ansible/errors.pyo
+${PYSITELIB}/ansible/inventory/__init__.py
+${PYSITELIB}/ansible/inventory/__init__.pyc
+${PYSITELIB}/ansible/inventory/__init__.pyo
+${PYSITELIB}/ansible/inventory/expand_hosts.py
+${PYSITELIB}/ansible/inventory/expand_hosts.pyc
+${PYSITELIB}/ansible/inventory/expand_hosts.pyo
+${PYSITELIB}/ansible/inventory/group.py
+${PYSITELIB}/ansible/inventory/group.pyc
+${PYSITELIB}/ansible/inventory/group.pyo
+${PYSITELIB}/ansible/inventory/host.py
+${PYSITELIB}/ansible/inventory/host.pyc
+${PYSITELIB}/ansible/inventory/host.pyo
+${PYSITELIB}/ansible/inventory/ini.py
+${PYSITELIB}/ansible/inventory/ini.pyc
+${PYSITELIB}/ansible/inventory/ini.pyo
+${PYSITELIB}/ansible/inventory/script.py
+${PYSITELIB}/ansible/inventory/script.pyc
+${PYSITELIB}/ansible/inventory/script.pyo
+${PYSITELIB}/ansible/inventory/vars_plugins/__init__.py
+${PYSITELIB}/ansible/inventory/vars_plugins/__init__.pyc
+${PYSITELIB}/ansible/inventory/vars_plugins/__init__.pyo
+${PYSITELIB}/ansible/inventory/vars_plugins/group_vars.py
+${PYSITELIB}/ansible/inventory/vars_plugins/group_vars.pyc
+${PYSITELIB}/ansible/inventory/vars_plugins/group_vars.pyo
+${PYSITELIB}/ansible/module_common.py
+${PYSITELIB}/ansible/module_common.pyc
+${PYSITELIB}/ansible/module_common.pyo
+${PYSITELIB}/ansible/playbook/__init__.py
+${PYSITELIB}/ansible/playbook/__init__.pyc
+${PYSITELIB}/ansible/playbook/__init__.pyo
+${PYSITELIB}/ansible/playbook/play.py
+${PYSITELIB}/ansible/playbook/play.pyc
+${PYSITELIB}/ansible/playbook/play.pyo
+${PYSITELIB}/ansible/playbook/task.py
+${PYSITELIB}/ansible/playbook/task.pyc
+${PYSITELIB}/ansible/playbook/task.pyo
+${PYSITELIB}/ansible/runner/__init__.py
+${PYSITELIB}/ansible/runner/__init__.pyc
+${PYSITELIB}/ansible/runner/__init__.pyo
+${PYSITELIB}/ansible/runner/action_plugins/__init__.py
+${PYSITELIB}/ansible/runner/action_plugins/__init__.pyc
+${PYSITELIB}/ansible/runner/action_plugins/__init__.pyo
+${PYSITELIB}/ansible/runner/action_plugins/add_host.py
+${PYSITELIB}/ansible/runner/action_plugins/add_host.pyc
+${PYSITELIB}/ansible/runner/action_plugins/add_host.pyo
+${PYSITELIB}/ansible/runner/action_plugins/async.py
+${PYSITELIB}/ansible/runner/action_plugins/async.pyc
+${PYSITELIB}/ansible/runner/action_plugins/async.pyo
+${PYSITELIB}/ansible/runner/action_plugins/copy.py
+${PYSITELIB}/ansible/runner/action_plugins/copy.pyc
+${PYSITELIB}/ansible/runner/action_plugins/copy.pyo
+${PYSITELIB}/ansible/runner/action_plugins/debug.py
+${PYSITELIB}/ansible/runner/action_plugins/debug.pyc
+${PYSITELIB}/ansible/runner/action_plugins/debug.pyo
+${PYSITELIB}/ansible/runner/action_plugins/fail.py
+${PYSITELIB}/ansible/runner/action_plugins/fail.pyc
+${PYSITELIB}/ansible/runner/action_plugins/fail.pyo
+${PYSITELIB}/ansible/runner/action_plugins/fetch.py
+${PYSITELIB}/ansible/runner/action_plugins/fetch.pyc
+${PYSITELIB}/ansible/runner/action_plugins/fetch.pyo
+${PYSITELIB}/ansible/runner/action_plugins/group_by.py
+${PYSITELIB}/ansible/runner/action_plugins/group_by.pyc
+${PYSITELIB}/ansible/runner/action_plugins/group_by.pyo
+${PYSITELIB}/ansible/runner/action_plugins/normal.py
+${PYSITELIB}/ansible/runner/action_plugins/normal.pyc
+${PYSITELIB}/ansible/runner/action_plugins/normal.pyo
+${PYSITELIB}/ansible/runner/action_plugins/pause.py
+${PYSITELIB}/ansible/runner/action_plugins/pause.pyc
+${PYSITELIB}/ansible/runner/action_plugins/pause.pyo
+${PYSITELIB}/ansible/runner/action_plugins/raw.py
+${PYSITELIB}/ansible/runner/action_plugins/raw.pyc
+${PYSITELIB}/ansible/runner/action_plugins/raw.pyo
+${PYSITELIB}/ansible/runner/action_plugins/script.py
+${PYSITELIB}/ansible/runner/action_plugins/script.pyc
+${PYSITELIB}/ansible/runner/action_plugins/script.pyo
+${PYSITELIB}/ansible/runner/action_plugins/template.py
+${PYSITELIB}/ansible/runner/action_plugins/template.pyc
+${PYSITELIB}/ansible/runner/action_plugins/template.pyo
+${PYSITELIB}/ansible/runner/connection.py
+${PYSITELIB}/ansible/runner/connection.pyc
+${PYSITELIB}/ansible/runner/connection.pyo
+${PYSITELIB}/ansible/runner/connection_plugins/__init__.py
+${PYSITELIB}/ansible/runner/connection_plugins/__init__.pyc
+${PYSITELIB}/ansible/runner/connection_plugins/__init__.pyo
+${PYSITELIB}/ansible/runner/connection_plugins/fireball.py
+${PYSITELIB}/ansible/runner/connection_plugins/fireball.pyc
+${PYSITELIB}/ansible/runner/connection_plugins/fireball.pyo
+${PYSITELIB}/ansible/runner/connection_plugins/local.py
+${PYSITELIB}/ansible/runner/connection_plugins/local.pyc
+${PYSITELIB}/ansible/runner/connection_plugins/local.pyo
+${PYSITELIB}/ansible/runner/connection_plugins/paramiko_ssh.py
+${PYSITELIB}/ansible/runner/connection_plugins/paramiko_ssh.pyc
+${PYSITELIB}/ansible/runner/connection_plugins/paramiko_ssh.pyo
+${PYSITELIB}/ansible/runner/connection_plugins/ssh.py
+${PYSITELIB}/ansible/runner/connection_plugins/ssh.pyc
+${PYSITELIB}/ansible/runner/connection_plugins/ssh.pyo
+${PYSITELIB}/ansible/runner/filter_plugins/__init__.py
+${PYSITELIB}/ansible/runner/filter_plugins/__init__.pyc
+${PYSITELIB}/ansible/runner/filter_plugins/__init__.pyo
+${PYSITELIB}/ansible/runner/filter_plugins/core.py
+${PYSITELIB}/ansible/runner/filter_plugins/core.pyc
+${PYSITELIB}/ansible/runner/filter_plugins/core.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/__init__.py
+${PYSITELIB}/ansible/runner/lookup_plugins/__init__.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/__init__.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/dnstxt.py
+${PYSITELIB}/ansible/runner/lookup_plugins/dnstxt.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/dnstxt.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/env.py
+${PYSITELIB}/ansible/runner/lookup_plugins/env.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/env.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/file.py
+${PYSITELIB}/ansible/runner/lookup_plugins/file.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/file.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/fileglob.py
+${PYSITELIB}/ansible/runner/lookup_plugins/fileglob.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/fileglob.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/items.py
+${PYSITELIB}/ansible/runner/lookup_plugins/items.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/items.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/lines.py
+${PYSITELIB}/ansible/runner/lookup_plugins/lines.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/lines.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/pipe.py
+${PYSITELIB}/ansible/runner/lookup_plugins/pipe.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/pipe.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/redis_kv.py
+${PYSITELIB}/ansible/runner/lookup_plugins/redis_kv.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/redis_kv.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/sequence.py
+${PYSITELIB}/ansible/runner/lookup_plugins/sequence.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/sequence.pyo
+${PYSITELIB}/ansible/runner/lookup_plugins/template.py
+${PYSITELIB}/ansible/runner/lookup_plugins/template.pyc
+${PYSITELIB}/ansible/runner/lookup_plugins/template.pyo
+${PYSITELIB}/ansible/runner/poller.py
+${PYSITELIB}/ansible/runner/poller.pyc
+${PYSITELIB}/ansible/runner/poller.pyo
+${PYSITELIB}/ansible/runner/return_data.py
+${PYSITELIB}/ansible/runner/return_data.pyc
+${PYSITELIB}/ansible/runner/return_data.pyo
+${PYSITELIB}/ansible/utils/__init__.py
+${PYSITELIB}/ansible/utils/__init__.pyc
+${PYSITELIB}/ansible/utils/__init__.pyo
+${PYSITELIB}/ansible/utils/module_docs.py
+${PYSITELIB}/ansible/utils/module_docs.pyc
+${PYSITELIB}/ansible/utils/module_docs.pyo
+${PYSITELIB}/ansible/utils/plugins.py
+${PYSITELIB}/ansible/utils/plugins.pyc
+${PYSITELIB}/ansible/utils/plugins.pyo
+${PYSITELIB}/ansible/utils/template.py
+${PYSITELIB}/ansible/utils/template.pyc
+${PYSITELIB}/ansible/utils/template.pyo
+share/ansible/add_host
+share/ansible/apt
+share/ansible/apt_key
+share/ansible/apt_repository
+share/ansible/assemble
+share/ansible/async_status
+share/ansible/async_wrapper
+share/ansible/authorized_key
+share/ansible/command
+share/ansible/copy
+share/ansible/cron
+share/ansible/debug
+share/ansible/easy_install
+share/ansible/ec2
+share/ansible/ec2_facts
+share/ansible/facter
+share/ansible/fail
+share/ansible/fetch
+share/ansible/file
+share/ansible/fireball
+share/ansible/get_url
+share/ansible/git
+share/ansible/group
+share/ansible/group_by
+share/ansible/hg
+share/ansible/ini_file
+share/ansible/lineinfile
+share/ansible/mail
+share/ansible/mount
+share/ansible/mysql_db
+share/ansible/mysql_user
+share/ansible/nagios
+share/ansible/ohai
+share/ansible/pacman
+share/ansible/pause
+share/ansible/ping
+share/ansible/pip
+share/ansible/pkgin
+share/ansible/postgresql_db
+share/ansible/postgresql_user
+share/ansible/raw
+share/ansible/script
+share/ansible/seboolean
+share/ansible/selinux
+share/ansible/service
+share/ansible/setup
+share/ansible/shell
+share/ansible/slurp
+share/ansible/subversion
+share/ansible/supervisorctl
+share/ansible/svr4pkg
+share/ansible/sysctl
+share/ansible/template
+share/ansible/user
+share/ansible/virt
+share/ansible/wait_for
+share/ansible/yum
diff --git a/sysutils/ansible/distinfo b/sysutils/ansible/distinfo
new file mode 100644
index 00000000000..db4403879fd
--- /dev/null
+++ b/sysutils/ansible/distinfo
@@ -0,0 +1,17 @@
+$NetBSD: distinfo,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+SHA1 (ansible-1.0.tar.gz) = 05c28bf696968ae8ef7779f8757b089ef4da6270
+RMD160 (ansible-1.0.tar.gz) = 6526c7588ccf53250601f76e6c3b4d5afcc1beeb
+Size (ansible-1.0.tar.gz) = 222956 bytes
+SHA1 (patch-Makefile) = 3a8eafe2c81c2684232e7345bf9f026a148cb3c4
+SHA1 (patch-lib_ansible_callbacks.py) = e75a660e0f89f5a29ab69bea71c50d4e146cd55a
+SHA1 (patch-lib_ansible_constants.py) = 52430ed0a4629c7774ab5ff9b4a1501ef6c0deaf
+SHA1 (patch-library_lineinfile) = 36a0cffd048380247644306ac08626869249c770
+SHA1 (patch-library_mysql_db) = ba034677a5f0e4727c37a1e0bbc9cd0314f4c4de
+SHA1 (patch-library_ping) = 6bb9b946df3a44ac938eee7e752bf2149936b8e6
+SHA1 (patch-library_pkgin) = 60f5350fbdb61b859bc562599e1e12636b3f98a9
+SHA1 (patch-library_raw) = 897aa5b8e5abadd23adc6de178cbec417c43e540
+SHA1 (patch-library_service) = 16f4f72b75269d5419ee417f6a94e96b38b927c7
+SHA1 (patch-library_setup) = a1f396477f60d4e9cb6c2f6b12d1b438f0724392
+SHA1 (patch-library_slurp) = 54a021519554c3eb95daf9396c32d6ec559ddab8
+SHA1 (patch-library_virt) = c53ef028ab29ff9aafe02946e85249e3421a7ab7
diff --git a/sysutils/ansible/patches/patch-Makefile b/sysutils/ansible/patches/patch-Makefile
new file mode 100644
index 00000000000..4547af20ff0
--- /dev/null
+++ b/sysutils/ansible/patches/patch-Makefile
@@ -0,0 +1,30 @@
+$NetBSD: patch-Makefile,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- Makefile.orig 2012-12-01 02:57:25.000000000 +0000
++++ Makefile
+@@ -24,7 +24,7 @@ ASCII2MAN = a2x -D $(dir $@) -d manpage
+ ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
+ MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1 docs/man/man1/ansible-doc.1
+
+-SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
++SITELIB = $(shell python2.7 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+
+ # VERSION file provides one place to update the software version
+ VERSION := $(shell cat VERSION)
+@@ -111,13 +111,13 @@ clean:
+ rm -rf docs/js
+
+ python:
+- python setup.py build
++ python2.7 setup.py build
+
+ install:
+- python setup.py install
++ python2.7 setup.py install
+
+ sdist: clean docs
+- python setup.py sdist -t MANIFEST.in
++ python2.7 setup.py sdist -t MANIFEST.in
+
+ rpmcommon: sdist
+ @mkdir -p rpm-build
diff --git a/sysutils/ansible/patches/patch-lib_ansible_callbacks.py b/sysutils/ansible/patches/patch-lib_ansible_callbacks.py
new file mode 100644
index 00000000000..6c06f838168
--- /dev/null
+++ b/sysutils/ansible/patches/patch-lib_ansible_callbacks.py
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_ansible_callbacks.py,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- lib/ansible/callbacks.py.orig 2013-01-26 16:50:21.000000000 +0000
++++ lib/ansible/callbacks.py
+@@ -31,9 +31,9 @@ elif os.path.exists("/usr/bin/cowsay"):
+ 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("@LOCALBASE@/bin/cowsay"):
+ # BSD path for cowsay
+- cowsay = "/usr/local/bin/cowsay"
++ cowsay = "@LOCALBASE@/bin/cowsay"
+
+ def call_callback_module(method_name, *args, **kwargs):
+
diff --git a/sysutils/ansible/patches/patch-lib_ansible_constants.py b/sysutils/ansible/patches/patch-lib_ansible_constants.py
new file mode 100644
index 00000000000..8ee23a7d6a1
--- /dev/null
+++ b/sysutils/ansible/patches/patch-lib_ansible_constants.py
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_ansible_constants.py,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py
+index b43986e..2e60046 100644
+--- lib/ansible/constants.py
++++ lib/ansible/constants.py
+@@ -65,6 +65,8 @@ if getattr(sys, "real_prefix", None):
+ DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
+ else:
+ DIST_MODULE_PATH = '/usr/share/ansible/'
++ # HF: work as non-root with python install --prefix=...
++ DIST_MODULE_PATH = '@PREFIX@/share/ansible/'
+
+ # sections in config file
+ DEFAULTS='defaults'
diff --git a/sysutils/ansible/patches/patch-library_lineinfile b/sysutils/ansible/patches/patch-library_lineinfile
new file mode 100644
index 00000000000..ce591acf217
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_lineinfile
@@ -0,0 +1,12 @@
+$NetBSD: patch-library_lineinfile,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/lineinfile.orig 2012-12-23 14:25:38.000000000 +0000
++++ library/lineinfile
+@@ -82,6 +82,7 @@ options:
+ get the original file back if you somehow clobbered it incorrectly.
+ examples:
+ - code: "lineinfile: dest=/etc/selinux/config regexp=^SELINUX= line=SELINUX=disabled"
++ - code: "lineinfile: \\\"dest=/usr/pkg/etc/sudoers state=present regexp='^%wheel' line ='%wheel ALL=(ALL) NOPASSWD: ALL'\\\""
+ - code: 'lineinfile: dest=/etc/sudoers state=absent regexp="^%wheel"'
+ '''
+
diff --git a/sysutils/ansible/patches/patch-library_mysql_db b/sysutils/ansible/patches/patch-library_mysql_db
new file mode 100644
index 00000000000..d7b594eadb6
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_mysql_db
@@ -0,0 +1,20 @@
+$NetBSD: patch-library_mysql_db,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/mysql_db.orig 2013-01-20 14:03:36.000000000 +0000
++++ library/mysql_db
+@@ -104,13 +104,13 @@ def db_delete(cursor, db):
+ return True
+
+ def db_dump(user, password, db_name, target):
+- res = os.system("/usr/bin/mysqldump -q -u "+user+ " -p"+password+" "
++ res = os.system("@LOCALBASE@/bin/mysqldump -q -u "+user+ " -p"+password+" "
+ +db_name+" > "
+ +target)
+ return (res == 0)
+
+ def db_import(user, password, db_name, target):
+- res = os.system("/usr/bin/mysql -u "+user+ " -p"+password+" "
++ res = os.system("@LOCALBASE@/bin/mysql -u "+user+ " -p"+password+" "
+ +db_name+" < "
+ +target)
+ return (res == 0)
diff --git a/sysutils/ansible/patches/patch-library_ping b/sysutils/ansible/patches/patch-library_ping
new file mode 100644
index 00000000000..e01357f688a
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_ping
@@ -0,0 +1,13 @@
+$NetBSD: patch-library_ping,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/ping.orig 2012-11-23 15:56:11.000000000 +0000
++++ library/ping
+@@ -26,7 +26,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(@LOCALBASE@/bin/ansible)
+ options: {}
+ examples:
+ - code: ansible webservers -m ping
diff --git a/sysutils/ansible/patches/patch-library_pkgin b/sysutils/ansible/patches/patch-library_pkgin
new file mode 100644
index 00000000000..5e9fcaa7d48
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_pkgin
@@ -0,0 +1,13 @@
+$NetBSD: patch-library_pkgin,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/pkgin.orig 2013-02-01 21:29:56.000000000 +0000
++++ library/pkgin
+@@ -55,7 +55,7 @@ import shlex
+ import os
+ import sys
+
+-PKGIN_PATH = "/opt/local/bin/pkgin"
++PKGIN_PATH = "@LOCALBASE@/bin/pkgin"
+
+ def query_package(module, name, state="present"):
+
diff --git a/sysutils/ansible/patches/patch-library_raw b/sysutils/ansible/patches/patch-library_raw
new file mode 100644
index 00000000000..e8dfe47b5a0
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_raw
@@ -0,0 +1,13 @@
+$NetBSD: patch-library_raw,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/raw.orig 2013-01-20 14:03:36.000000000 +0000
++++ library/raw
+@@ -28,7 +28,7 @@ description:
+ - This module does not require python on the remote system, much like
+ the M(script) module.
+ examples:
+- - description: Example from C(/usr/bin/ansible) to bootstrap a legacy python 2.4 host
++ - description: Example from C(@LOCALBASE@/bin/ansible) to bootstrap a legacy python 2.4 host
+ code: "action: raw yum -y install python-simplejson"
+ notes:
+ - If you want to execute a command securely and predictably, it may be
diff --git a/sysutils/ansible/patches/patch-library_service b/sysutils/ansible/patches/patch-library_service
new file mode 100644
index 00000000000..80c9548fa65
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_service
@@ -0,0 +1,70 @@
+$NetBSD: patch-library_service,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/service.orig 2013-02-09 19:55:06.000000000 +0000
++++ library/service
+@@ -551,6 +551,65 @@ class OpenBsdService(Service):
+ return self.execute_command("%s %s" % (self.svc_cmd, self.action))
+
+ # ===========================================
++# Subclass: NetBSD
++
++class NetBsdService(Service):
++ """
++ This is the NetBSD Service manipulation class - it uses the /etc/rc.conf
++ file for controlling services started at boot, check status and perform
++ direct service manipulation. Init scripts in /etc/rcd are used for
++ controlling services (start/stop) as well as for controlling the current
++ state.
++ """
++
++ platform = 'NetBSD'
++ distribution = None
++
++ def get_service_tools(self):
++ initpaths = [ '/etc/rc.d' ] # better: $rc_directories - how to get in here? Run: sh -c '. /etc/rc.conf ; echo $rc_directories'
++
++ for initdir in initpaths:
++ initscript = "%s/%s" % (initdir,self.name)
++ if os.path.isfile(initscript):
++ self.svc_initscript = initscript
++
++ if not self.svc_initscript:
++ self.module.fail_json(msg='unable to find rc.d script')
++
++ def service_enable(self):
++ if self.enable:
++ self.rcconf_value = "YES"
++ else:
++ self.rcconf_value = "NO"
++
++ rcfiles = [ '/etc/rc.conf' ] # Overkill?
++ for rcfile in rcfiles:
++ if os.path.isfile(rcfile):
++ self.rcconf_file = rcfile
++
++ self.rcconf_key = "%s" % self.name
++
++ return self.service_enable_rcconf()
++
++ def get_service_status(self):
++ self.svc_cmd = "%s" % self.svc_initscript
++ rc, stdout, stderr = self.execute_command("%s %s" % (self.svc_cmd, 'onestatus'))
++ if rc == 1:
++ self.running = False
++ elif rc == 0:
++ self.running = True
++
++ def service_control(self):
++ if self.action is "start":
++ self.action = "onestart"
++ if self.action is "stop":
++ self.action = "onestop"
++
++ self.svc_cmd = "%s" % self.svc_initscript
++ return self.execute_command("%s %s" % (self.svc_cmd, self.action))
++
++
++# ===========================================
+ # Main control flow
+
+ def main():
diff --git a/sysutils/ansible/patches/patch-library_setup b/sysutils/ansible/patches/patch-library_setup
new file mode 100644
index 00000000000..e7267aa42be
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_setup
@@ -0,0 +1,44 @@
+$NetBSD: patch-library_setup,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/setup.orig 2013-01-26 17:20:45.000000000 +0000
++++ library/setup
+@@ -34,7 +34,7 @@ options: {}
+ description:
+ - This module is automatically called by playbooks to gather useful
+ variables about remote hosts that can be used in playbooks. It can also be
+- executed directly by C(/usr/bin/ansible) to check what variables are
++ executed directly by C(@LOCALBASE@/bin/ansible) to check what variables are
+ available to a host. Ansible provides many I(facts) about the system,
+ automatically.
+ notes:
+@@ -86,7 +86,7 @@ class Facts(object):
+ { 'path' : '/usr/bin/apt-get', 'name' : 'apt' },
+ { 'path' : '/usr/bin/zypper', 'name' : 'zypper' },
+ { 'path' : '/usr/bin/pacman', 'name' : 'pacman' },
+- { 'path' : '/opt/local/bin/pkgin', 'name' : 'pkgin' } ]
++ { 'path' : '@LOCALBASE@/bin/pkgin', 'name' : 'pkgin' } ]
+
+ def __init__(self):
+ self.facts = {}
+@@ -875,8 +875,8 @@ def run_setup(module):
+ # if facter is installed, and we can use --json because
+ # ruby-json is ALSO installed, include facter data in the JSON
+
+- if os.path.exists("/usr/bin/facter"):
+- rc, out, err = module.run_command("/usr/bin/facter --json")
++ if os.path.exists("@LOCALBASE@/bin/facter"):
++ rc, out, err = module.run_command("@LOCALBASE@/bin/facter --json")
+ facter = True
+ try:
+ facter_ds = json.loads(out)
+@@ -890,8 +890,8 @@ def run_setup(module):
+ # because it contains a lot of nested stuff we can't use for
+ # templating w/o making a nicer key for it (TODO)
+
+- if os.path.exists("/usr/bin/ohai"):
+- rc, out, err = module.run_command("/usr/bin/ohai")
++ if os.path.exists("@LOCALBASE@/bin/ohai"):
++ rc, out, err = module.run_command("@LOCALBASE@/bin/ohai")
+ ohai = True
+ try:
+ ohai_ds = json.loads(out)
diff --git a/sysutils/ansible/patches/patch-library_slurp b/sysutils/ansible/patches/patch-library_slurp
new file mode 100644
index 00000000000..8239bbef2ea
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_slurp
@@ -0,0 +1,13 @@
+$NetBSD: patch-library_slurp,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/slurp.orig 2012-11-23 15:56:11.000000000 +0000
++++ library/slurp
+@@ -40,7 +40,7 @@ examples:
+ "content": "aGVsbG8gQW5zaWJsZSB3b3JsZAo=",
+ "encoding": "base64"
+ }
+- description: "Example using C(/usr/bin/ansible)"
++ description: "Example using C(@LOCALBASE@/bin/ansible)"
+ notes:
+ - "See also: M(fetch)"
+ requirements: []
diff --git a/sysutils/ansible/patches/patch-library_virt b/sysutils/ansible/patches/patch-library_virt
new file mode 100644
index 00000000000..1502cb91c53
--- /dev/null
+++ b/sysutils/ansible/patches/patch-library_virt
@@ -0,0 +1,13 @@
+$NetBSD: patch-library_virt,v 1.1 2013/02/26 00:13:00 hubertf Exp $
+
+--- library/virt.orig 2012-11-20 02:15:41.000000000 +0000
++++ library/virt
+@@ -45,7 +45,7 @@ examples:
+ - code: "virt: guest=alpha state=running"
+ description: "Example from Ansible Playbooks"
+ - code: ansible host -m virt -a "guest=alpha command=status"
+- description: "Example guest management with C(/usr/bin/ansible)"
++ description: "Example guest management with C(@LOCALBASE@/bin/ansible)"
+ notes:
+ - "Other non-idempotent commands are: C(status), C(pause), C(unpause),
+ C(get_xml), C(autostart), C(freemem), C(list_vms), C(info), C(nodeinfo),