Update ansible to version 1.1. From the CHANGELOG.md:

1.1 "Mean Street" -- 4/2/2013

Core Features

* added --check option for "dry run" mode
* added --diff option to show how templates or copied files change, or
  might change
* --list-tasks for the playbook will list the tasks without running them
* able to set the environment by setting "environment:" as a dictionary
  on any task (go proxy support!)
* added ansible_ssh_user and ansible_ssh_pass for per-host/group username
  and password
* jinja2 extensions can now be loaded from the config file
* support for complex arguments to modules (within reason)
* can specify ansible_connection=X to define the connection type in
  inventory variables
* a new chroot connection type
* module common code now has basic type checking (and casting) capability
* module common now supports a 'no_log' attribute to mark a field as
  not to be syslogged
* inventory can now point to a directory containing multiple
  scripts/hosts files, if using this, put group_vars/host_vars
  directories inside this directory
* added configurable crypt scheme for 'vars_prompt'
* password generating lookup plugin -- $PASSWORD(path/to/save/data/in)
* added --step option to ansible-playbook, works just like Linux
  interactive startup!

Modules Added:

* bzr (bazaar version control)
* cloudformation
* django-manage
* gem (ruby gems)
* homebrew
* lvg (logical volume groups)
* lvol (LVM logical volumes)
* macports
* mongodb_user
* netscaler
* okg
* openbsd_pkg
* rabbit_mq_plugin
* rabbit_mq_user
* rabbit_mq_vhost
* rabbit_mq_parameter
* rhn_channel
* s3 -- allows putting file contents in buckets for sharing over s3
* uri module -- can get/put/post/etc
* vagrant -- launching VMs with vagrant, this is different from existing
  vagrant plugin
* zfs
This commit is contained in:
riz 2013-04-13 17:51:57 +00:00
parent d2e5011ebd
commit 4e6bda04c4
14 changed files with 158 additions and 202 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.6 2013/04/06 11:39:26 rodent Exp $
# $NetBSD: Makefile,v 1.7 2013/04/13 17:51:57 riz Exp $
#
DISTNAME= ansible-1.0
PKGREVISION= 1
DISTNAME= ansible-1.1
CATEGORIES= sysutils
MASTER_SITES= http://ansible.cc/releases/

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.3 2013/02/26 20:11:02 riz Exp $
@comment $NetBSD: PLIST,v 1.4 2013/04/13 17:51:57 riz Exp $
bin/ansible
bin/ansible-doc
bin/ansible-playbook
@ -28,6 +28,9 @@ ${PYSITELIB}/ansible/errors.pyo
${PYSITELIB}/ansible/inventory/__init__.py
${PYSITELIB}/ansible/inventory/__init__.pyc
${PYSITELIB}/ansible/inventory/__init__.pyo
${PYSITELIB}/ansible/inventory/dir.py
${PYSITELIB}/ansible/inventory/dir.pyc
${PYSITELIB}/ansible/inventory/dir.pyo
${PYSITELIB}/ansible/inventory/expand_hosts.py
${PYSITELIB}/ansible/inventory/expand_hosts.pyc
${PYSITELIB}/ansible/inventory/expand_hosts.pyo
@ -109,6 +112,9 @@ ${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/chroot.py
${PYSITELIB}/ansible/runner/connection_plugins/chroot.pyc
${PYSITELIB}/ansible/runner/connection_plugins/chroot.pyo
${PYSITELIB}/ansible/runner/connection_plugins/fireball.py
${PYSITELIB}/ansible/runner/connection_plugins/fireball.pyc
${PYSITELIB}/ansible/runner/connection_plugins/fireball.pyo
@ -142,15 +148,27 @@ ${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/first_found.py
${PYSITELIB}/ansible/runner/lookup_plugins/first_found.pyc
${PYSITELIB}/ansible/runner/lookup_plugins/first_found.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/nested.py
${PYSITELIB}/ansible/runner/lookup_plugins/nested.pyc
${PYSITELIB}/ansible/runner/lookup_plugins/nested.pyo
${PYSITELIB}/ansible/runner/lookup_plugins/password.py
${PYSITELIB}/ansible/runner/lookup_plugins/password.pyc
${PYSITELIB}/ansible/runner/lookup_plugins/password.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/random_choice.py
${PYSITELIB}/ansible/runner/lookup_plugins/random_choice.pyc
${PYSITELIB}/ansible/runner/lookup_plugins/random_choice.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
@ -178,10 +196,10 @@ ${PYSITELIB}/ansible/utils/plugins.pyo
${PYSITELIB}/ansible/utils/template.py
${PYSITELIB}/ansible/utils/template.pyc
${PYSITELIB}/ansible/utils/template.pyo
man/man1/ansible.1
man/man1/ansible-doc.1
man/man1/ansible-playbook.1
man/man1/ansible-pull.1
man/man1/ansible.1
man/man3/ansible.add_host.3
man/man3/ansible.apt.3
man/man3/ansible.apt_key.3
@ -189,31 +207,44 @@ man/man3/ansible.apt_repository.3
man/man3/ansible.assemble.3
man/man3/ansible.async_status.3
man/man3/ansible.authorized_key.3
man/man3/ansible.bzr.3
man/man3/ansible.cloudformation.3
man/man3/ansible.command.3
man/man3/ansible.copy.3
man/man3/ansible.cron.3
man/man3/ansible.debug.3
man/man3/ansible.django_manage.3
man/man3/ansible.easy_install.3
man/man3/ansible.ec2.3
man/man3/ansible.ec2_facts.3
man/man3/ansible.ec2_vol.3
man/man3/ansible.facter.3
man/man3/ansible.fail.3
man/man3/ansible.fetch.3
man/man3/ansible.file.3
man/man3/ansible.fireball.3
man/man3/ansible.gem.3
man/man3/ansible.get_url.3
man/man3/ansible.git.3
man/man3/ansible.group.3
man/man3/ansible.group_by.3
man/man3/ansible.hg.3
man/man3/ansible.homebrew.3
man/man3/ansible.ini_file.3
man/man3/ansible.lineinfile.3
man/man3/ansible.lvg.3
man/man3/ansible.lvol.3
man/man3/ansible.macports.3
man/man3/ansible.mail.3
man/man3/ansible.mongodb_user.3
man/man3/ansible.mount.3
man/man3/ansible.mysql_db.3
man/man3/ansible.mysql_user.3
man/man3/ansible.nagios.3
man/man3/ansible.netscaler.3
man/man3/ansible.ohai.3
man/man3/ansible.openbsd_pkg.3
man/man3/ansible.opkg.3
man/man3/ansible.pacman.3
man/man3/ansible.pause.3
man/man3/ansible.ping.3
@ -221,7 +252,13 @@ man/man3/ansible.pip.3
man/man3/ansible.pkgin.3
man/man3/ansible.postgresql_db.3
man/man3/ansible.postgresql_user.3
man/man3/ansible.rabbitmq_parameter.3
man/man3/ansible.rabbitmq_plugin.3
man/man3/ansible.rabbitmq_user.3
man/man3/ansible.rabbitmq_vhost.3
man/man3/ansible.raw.3
man/man3/ansible.rhn_channel.3
man/man3/ansible.s3.3
man/man3/ansible.script.3
man/man3/ansible.seboolean.3
man/man3/ansible.selinux.3
@ -234,10 +271,13 @@ man/man3/ansible.supervisorctl.3
man/man3/ansible.svr4pkg.3
man/man3/ansible.sysctl.3
man/man3/ansible.template.3
man/man3/ansible.uri.3
man/man3/ansible.user.3
man/man3/ansible.vagrant.3
man/man3/ansible.virt.3
man/man3/ansible.wait_for.3
man/man3/ansible.yum.3
man/man3/ansible.zfs.3
share/ansible/add_host
share/ansible/apt
share/ansible/apt_key
@ -246,31 +286,44 @@ share/ansible/assemble
share/ansible/async_status
share/ansible/async_wrapper
share/ansible/authorized_key
share/ansible/bzr
share/ansible/cloudformation
share/ansible/command
share/ansible/copy
share/ansible/cron
share/ansible/debug
share/ansible/django_manage
share/ansible/easy_install
share/ansible/ec2
share/ansible/ec2_facts
share/ansible/ec2_vol
share/ansible/facter
share/ansible/fail
share/ansible/fetch
share/ansible/file
share/ansible/fireball
share/ansible/gem
share/ansible/get_url
share/ansible/git
share/ansible/group
share/ansible/group_by
share/ansible/hg
share/ansible/homebrew
share/ansible/ini_file
share/ansible/lineinfile
share/ansible/lvg
share/ansible/lvol
share/ansible/macports
share/ansible/mail
share/ansible/mongodb_user
share/ansible/mount
share/ansible/mysql_db
share/ansible/mysql_user
share/ansible/nagios
share/ansible/netscaler
share/ansible/ohai
share/ansible/openbsd_pkg
share/ansible/opkg
share/ansible/pacman
share/ansible/pause
share/ansible/ping
@ -278,7 +331,13 @@ share/ansible/pip
share/ansible/pkgin
share/ansible/postgresql_db
share/ansible/postgresql_user
share/ansible/rabbitmq_parameter
share/ansible/rabbitmq_plugin
share/ansible/rabbitmq_user
share/ansible/rabbitmq_vhost
share/ansible/raw
share/ansible/rhn_channel
share/ansible/s3
share/ansible/script
share/ansible/seboolean
share/ansible/selinux
@ -291,19 +350,25 @@ share/ansible/supervisorctl
share/ansible/svr4pkg
share/ansible/sysctl
share/ansible/template
share/ansible/uri
share/ansible/user
share/ansible/vagrant
share/ansible/virt
share/ansible/wait_for
share/ansible/yum
share/ansible/zfs
share/examples/ansible/ansible.cfg
share/examples/ansible/hosts
share/examples/ansible/playbooks/ansible_pull.yml
share/examples/ansible/playbooks/batch_size_control.yml
share/examples/ansible/playbooks/complex_args.yml
share/examples/ansible/playbooks/conditionals_part1.yml
share/examples/ansible/playbooks/conditionals_part2.yml
share/examples/ansible/playbooks/conditionals_part3.yml
share/examples/ansible/playbooks/custom_filters.yml
share/examples/ansible/playbooks/delegation.yml
share/examples/ansible/playbooks/environment.yml
share/examples/ansible/playbooks/eucalyptus-ec2.yml
share/examples/ansible/playbooks/file_secontext.yml
share/examples/ansible/playbooks/filter_plugins/custom_plugins.py
share/examples/ansible/playbooks/get_url.yml
@ -312,12 +377,15 @@ share/examples/ansible/playbooks/group_commands.yml
share/examples/ansible/playbooks/handlers/handlers.yml
share/examples/ansible/playbooks/intermediate_example.yml
share/examples/ansible/playbooks/intro_example.yml
share/examples/ansible/playbooks/loop_nested.yml
share/examples/ansible/playbooks/loop_plugins.yml
share/examples/ansible/playbooks/loop_with_items.yml
share/examples/ansible/playbooks/mysql.yml
share/examples/ansible/playbooks/nested_playbooks.yml
share/examples/ansible/playbooks/netscaler.yml
share/examples/ansible/playbooks/postgresql.yml
share/examples/ansible/playbooks/prompts.yml
share/examples/ansible/playbooks/rabbitmq.yml
share/examples/ansible/playbooks/register_logic.yml
share/examples/ansible/playbooks/selective_file_sources.yml
share/examples/ansible/playbooks/tags.yml
@ -331,4 +399,5 @@ share/examples/ansible/playbooks/user_commands.yml
share/examples/ansible/playbooks/vars/CentOS.yml
share/examples/ansible/playbooks/vars/defaults.yml
share/examples/ansible/playbooks/vars/external_vars.yml
share/examples/ansible/playbooks/zfs.yml
@pkgdir etc/ansible

View file

@ -1,20 +1,17 @@
$NetBSD: distinfo,v 1.3 2013/02/27 12:32:06 hubertf Exp $
$NetBSD: distinfo,v 1.4 2013/04/13 17:51:57 riz 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) = c7e66169fcfdd130e04e6f6b4fcd9cf16828e27d
SHA1 (patch-docs_man_man1_ansible-playbook.1) = a7c4a1af3038615922e54f8c683daa0f9d920e0f
SHA1 (patch-docs_man_man1_ansible.1) = 41fa78147cfa7be140742f1fe781d9f5652f4d8a
SHA1 (ansible-1.1.tar.gz) = fa1009e80b624945675bbaba690b895a1ff050fd
RMD160 (ansible-1.1.tar.gz) = 220dd91db3ab0d6df5dec456448e22d436077f3d
Size (ansible-1.1.tar.gz) = 302115 bytes
SHA1 (patch-docs_man_man1_ansible-playbook.1) = 33ce57bccb6cb29e978871a868bf26ca17d87660
SHA1 (patch-docs_man_man1_ansible.1) = 266a520f8f227686cc84b8a3e9b6fac8e20e1247
SHA1 (patch-examples_ansible.cfg) = 631236fadaadfd28d71b7bc7cce33e62691ee407
SHA1 (patch-lib_ansible_callbacks.py) = e75a660e0f89f5a29ab69bea71c50d4e146cd55a
SHA1 (patch-lib_ansible_constants.py) = 0e6102658553a833b98c79be12340dfccda3e87d
SHA1 (patch-library_lineinfile) = 36a0cffd048380247644306ac08626869249c770
SHA1 (patch-library_mysql_db) = ba034677a5f0e4727c37a1e0bbc9cd0314f4c4de
SHA1 (patch-lib_ansible_callbacks.py) = 607809cf64a676ef91a70b915e97ac87b8ddd31b
SHA1 (patch-lib_ansible_constants.py) = 51171c84680b18a2d1ff2401cc1fd08e009aa83c
SHA1 (patch-library_mysql_db) = 45e782d41c3e2bc9e462441205f894e7089d798a
SHA1 (patch-library_ping) = 6bb9b946df3a44ac938eee7e752bf2149936b8e6
SHA1 (patch-library_pkgin) = 60f5350fbdb61b859bc562599e1e12636b3f98a9
SHA1 (patch-library_pkgin) = 4b57890efa9145c0b2b68c2c75c990618488d824
SHA1 (patch-library_raw) = 897aa5b8e5abadd23adc6de178cbec417c43e540
SHA1 (patch-library_service) = 7fd6392b5f283ba5d511182ba9611f589b8a3d28
SHA1 (patch-library_setup) = a1f396477f60d4e9cb6c2f6b12d1b438f0724392
SHA1 (patch-library_setup) = 7489a5c905916cc1559db15b730a1a93cb782971
SHA1 (patch-library_slurp) = 54a021519554c3eb95daf9396c32d6ec559ddab8
SHA1 (patch-library_virt) = c53ef028ab29ff9aafe02946e85249e3421a7ab7
SHA1 (patch-library_virt) = b01c7b2d7cd49ad7720d3a1430d7bba41673d2a6

View file

@ -1,30 +0,0 @@
$NetBSD: patch-Makefile,v 1.2 2013/02/26 17:42:59 riz 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 @PYTHONBIN@ -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
+ @PYTHONBIN@ setup.py build
install:
- python setup.py install
+ @PYTHONBIN@ setup.py install
sdist: clean docs
- python setup.py sdist -t MANIFEST.in
+ @PYTHONBIN@ setup.py sdist -t MANIFEST.in
rpmcommon: sdist
@mkdir -p rpm-build

View file

@ -1,7 +1,7 @@
$NetBSD: patch-docs_man_man1_ansible-playbook.1,v 1.1 2013/02/26 17:42:59 riz Exp $
$NetBSD: patch-docs_man_man1_ansible-playbook.1,v 1.2 2013/04/13 17:51:57 riz Exp $
--- docs/man/man1/ansible-playbook.1.orig 2013-02-01 19:15:13.000000000 -0800
+++ docs/man/man1/ansible-playbook.1 2013-02-25 11:45:48.000000000 -0800
--- docs/man/man1/ansible-playbook.1.orig 2013-04-13 08:48:00.000000000 -0700
+++ docs/man/man1/ansible-playbook.1 2013-04-13 08:50:25.000000000 -0700
@@ -44,7 +44,7 @@
The
\fIPATH\fR
@ -20,7 +20,7 @@ $NetBSD: patch-docs_man_man1_ansible-playbook.1,v 1.1 2013/02/26 17:42:59 riz Ex
.RE
.PP
\fB\-e\fR \fIVARS\fR, \fB\-\-extra\-vars=\fR\fIVARS\fR
@@ -122,11 +122,11 @@
@@ -142,11 +142,11 @@
ANSIBLE_LIBRARY \(em Override the default ansible module library path
.SH "FILES"
.sp

View file

@ -1,17 +1,17 @@
$NetBSD: patch-docs_man_man1_ansible.1,v 1.1 2013/02/26 17:42:59 riz Exp $
$NetBSD: patch-docs_man_man1_ansible.1,v 1.2 2013/04/13 17:51:57 riz Exp $
--- docs/man/man1/ansible.1.orig 2013-02-25 11:49:52.000000000 -0800
+++ docs/man/man1/ansible.1 2013-02-25 11:50:30.000000000 -0800
@@ -53,7 +53,7 @@
--- docs/man/man1/ansible.1.orig 2013-04-13 08:53:23.000000000 -0700
+++ docs/man/man1/ansible.1 2013-04-13 08:55:50.000000000 -0700
@@ -44,7 +44,7 @@
The
\fIPATH\fR
to the inventory hosts file, which defaults to
-\fI/etc/ansible/hosts\fR\&.
+\fI@PKG_SYSCONFDIR@/ansible/hosts\fR\&.
+\fI@PREFIX@/ansible/hosts\fR\&.
.RE
.PP
\fB\-f\fR \fINUM\fR, \fB\-\-forks=\fR\fINUM\fR
@@ -79,7 +79,7 @@
@@ -70,7 +70,7 @@
The
\fIDIRECTORY\fR
to load modules from\&. The default is
@ -19,19 +19,19 @@ $NetBSD: patch-docs_man_man1_ansible.1,v 1.1 2013/02/26 17:42:59 riz Exp $
+\fI@PREFIX@/share/ansible\fR\&.
.RE
.PP
\fB\-a\fR \*(Aq\fIARGUMENTS\fR\*(Aq, \fB\-\-args=\fR\*(Aq\fIARGUMENTS\fR\*(Aq
@@ -177,11 +177,11 @@
\fB\-a\fR \'\fIARGUMENTS\fR\', \fB\-\-args=\fR\'\fIARGUMENTS\fR\'
@@ -168,11 +168,11 @@
Ranges of hosts are also supported\&. For more information and additional options, see the documentation on http://ansible\&.github\&.com/\&.
.SH "FILES"
.sp
-/etc/ansible/hosts \(em Default inventory file
+@PKG_SYSCONFDIR@/ansible/hosts \(em Default inventory file
+@PREFIX@/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
+@PREFIX@/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

@ -1,8 +1,8 @@
$NetBSD: patch-lib_ansible_callbacks.py,v 1.1 2013/02/26 00:13:00 hubertf Exp $
$NetBSD: patch-lib_ansible_callbacks.py,v 1.2 2013/04/13 17:51:57 riz 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"):
--- lib/ansible/callbacks.py.orig 2013-03-30 16:29:28.000000000 -0700
+++ lib/ansible/callbacks.py 2013-04-13 09:05:36.000000000 -0700
@@ -30,9 +30,9 @@
cowsay = "/usr/bin/cowsay"
elif os.path.exists("/usr/games/cowsay"):
cowsay = "/usr/games/cowsay"
@ -11,6 +11,6 @@ $NetBSD: patch-lib_ansible_callbacks.py,v 1.1 2013/02/26 00:13:00 hubertf Exp $
# BSD path for cowsay
- cowsay = "/usr/local/bin/cowsay"
+ cowsay = "@LOCALBASE@/bin/cowsay"
def call_callback_module(method_name, *args, **kwargs):
elif os.path.exists("/opt/local/bin/cowsay"):
# MacPorts path for cowsay
cowsay = "/opt/local/bin/cowsay"

View file

@ -1,7 +1,7 @@
$NetBSD: patch-lib_ansible_constants.py,v 1.2 2013/02/26 17:42:59 riz Exp $
$NetBSD: patch-lib_ansible_constants.py,v 1.3 2013/04/13 17:51:57 riz Exp $
--- lib/ansible/constants.py.orig 2013-02-01 18:15:55.000000000 -0800
+++ lib/ansible/constants.py 2013-02-25 11:58:52.000000000 -0800
--- lib/ansible/constants.py.orig 2013-03-04 13:18:12.000000000 -0800
+++ lib/ansible/constants.py 2013-04-13 09:48:31.000000000 -0700
@@ -36,7 +36,7 @@
p = ConfigParser.ConfigParser()
path1 = os.path.expanduser(os.environ.get('ANSIBLE_CONFIG', "~/.ansible.cfg"))
@ -27,9 +27,9 @@ $NetBSD: patch-lib_ansible_constants.py,v 1.2 2013/02/26 17:42:59 riz Exp $
DEFAULT_MODULE_PATH = shell_expand_path(get_config(p, DEFAULTS, 'library', 'ANSIBLE_LIBRARY', DIST_MODULE_PATH))
DEFAULT_REMOTE_TMP = shell_expand_path(get_config(p, DEFAULTS, 'remote_tmp', 'ANSIBLE_REMOTE_TEMP', '$HOME/.ansible/tmp'))
DEFAULT_MODULE_NAME = get_config(p, DEFAULTS, 'module_name', None, 'command')
@@ -95,12 +95,12 @@
DEFAULT_SUDO_FLAGS = get_config(p, DEFAULTS, 'sudo_flags', 'ANSIBLE_SUDO_FLAGS', '-H')
@@ -96,12 +96,12 @@
DEFAULT_HASH_BEHAVIOUR = get_config(p, DEFAULTS, 'hash_behaviour', 'ANSIBLE_HASH_BEHAVIOUR', 'replace')
DEFAULT_JINJA2_EXTENSIONS = get_config(p, DEFAULTS, 'jinja2_extensions', 'ANSIBLE_JINJA2_EXTENSIONS', None)
-DEFAULT_ACTION_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'action_plugins', 'ANSIBLE_ACTION_PLUGINS', '/usr/share/ansible_plugins/action_plugins'))
-DEFAULT_CALLBACK_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'callback_plugins', 'ANSIBLE_CALLBACK_PLUGINS', '/usr/share/ansible_plugins/callback_plugins'))

View file

@ -1,12 +0,0 @@
$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"'
'''

View file

@ -1,20 +1,20 @@
$NetBSD: patch-library_mysql_db,v 1.1 2013/02/26 00:13:00 hubertf Exp $
$NetBSD: patch-library_mysql_db,v 1.2 2013/04/13 17:51:57 riz 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):
--- library/mysql_db.orig 2013-03-30 16:29:28.000000000 -0700
+++ library/mysql_db 2013-04-13 09:13:23.000000000 -0700
@@ -109,13 +109,13 @@
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+" "
def db_dump(host, user, password, db_name, target):
- res = os.system("/usr/bin/mysqldump -q -h "+host+"-u "+user+ " -p"+password+" "
+ res = os.system("@LOCALBASE@/bin/mysqldump -q -h "+host+"-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+" "
def db_import(host, user, password, db_name, target):
- res = os.system("/usr/bin/mysql -h "+host+" -u "+user+ " -p"+password+" "
+ res = os.system("@LOCALBASE@/bin/mysql -h "+host+" -u "+user+ " -p"+password+" "
+db_name+" < "
+target)
return (res == 0)

View file

@ -1,13 +1,13 @@
$NetBSD: patch-library_pkgin,v 1.1 2013/02/26 00:13:00 hubertf Exp $
$NetBSD: patch-library_pkgin,v 1.2 2013/04/13 17:51:57 riz Exp $
--- library/pkgin.orig 2013-02-01 21:29:56.000000000 +0000
+++ library/pkgin
@@ -55,7 +55,7 @@ import shlex
import os
import sys
--- library/pkgin.orig 2013-03-30 16:29:28.000000000 -0700
+++ library/pkgin 2013-04-13 09:36:29.000000000 -0700
@@ -118,7 +118,7 @@
state = dict(default="present", choices=["present","absent"]),
name = dict(aliases=["pkg"], required=True)))
-PKGIN_PATH = "/opt/local/bin/pkgin"
+PKGIN_PATH = "@LOCALBASE@/bin/pkgin"
- pkgin_path = module.get_bin_path('pkgin', True, ['/opt/local/bin'])
+ pkgin_path = module.get_bin_path('pkgin', True, ['@LOCALBASE@/bin'])
def query_package(module, name, state="present"):
p = module.params

View file

@ -1,70 +0,0 @@
$NetBSD: patch-library_service,v 1.2 2013/02/27 12:32:06 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), daemonize=True)
+
+
+# ===========================================
# Main control flow
def main():

View file

@ -1,26 +1,26 @@
$NetBSD: patch-library_setup,v 1.1 2013/02/26 00:13:00 hubertf Exp $
$NetBSD: patch-library_setup,v 1.2 2013/04/13 17:51:57 riz Exp $
--- library/setup.orig 2013-01-26 17:20:45.000000000 +0000
+++ library/setup
@@ -34,7 +34,7 @@ options: {}
description:
--- library/setup.orig 2013-04-02 17:33:54.000000000 -0700
+++ library/setup 2013-04-13 09:39:00.000000000 -0700
@@ -43,7 +43,7 @@
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' },
notes:
@@ -111,7 +111,7 @@
{ '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):
{ 'path' : '/usr/bin/pacman', 'name' : 'pacman' },
{ 'path' : '/bin/opkg', 'name' : 'opkg' },
- { 'path' : '/opt/local/bin/pkgin', 'name' : 'pkgin' },
+ { 'path' : '@LOCALBASE@/bin/pkgin', 'name' : 'pkgin' },
{ 'path' : '/opt/local/bin/port', 'name' : 'macports' },
{ 'path' : '/sbin/apk', 'name' : 'apk' },
]
@@ -1531,8 +1531,8 @@
# if facter is installed, and we can use --json because
# ruby-json is ALSO installed, include facter data in the JSON
@ -31,7 +31,7 @@ $NetBSD: patch-library_setup,v 1.1 2013/02/26 00:13:00 hubertf Exp $
facter = True
try:
facter_ds = json.loads(out)
@@ -890,8 +890,8 @@ def run_setup(module):
@@ -1546,8 +1546,8 @@
# because it contains a lot of nested stuff we can't use for
# templating w/o making a nicer key for it (TODO)

View file

@ -1,13 +1,16 @@
$NetBSD: patch-library_virt,v 1.1 2013/02/26 00:13:00 hubertf Exp $
$NetBSD: patch-library_virt,v 1.2 2013/04/13 17:51:58 riz 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"
--- library/virt.orig 2013-04-02 17:33:54.000000000 -0700
+++ library/virt 2013-04-13 09:41:16.000000000 -0700
@@ -48,9 +48,9 @@
- code: "virt: name=alpha state=running"
description: "Example from Ansible Playbooks"
- code: ansible host -m virt -a "guest=alpha command=status"
- code: ansible host -m virt -a "name=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),
- code: ansible host -m virt -a "name=alpha command=get_xml"
- description: "Use C(/usr/bin/ansible) to get the xml of the guest machine alpha"
+ description: "Use C(@LOCALBASE@/bin/ansible) to get the xml of the guest machine alpha"
requirements: [ "libvirt" ]
author: Michael DeHaan, Seth Vidal
'''