[csw-devel] SF.net SVN: gar:[22085] csw/mgar/pkg/ansible/trunk
guengel at users.sourceforge.net
guengel at users.sourceforge.net
Tue Oct 1 19:52:43 CEST 2013
Revision: 22085
http://gar.svn.sourceforge.net/gar/?rev=22085&view=rev
Author: guengel
Date: 2013-10-01 17:52:43 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
ansible/trunk: Added README.CSW and sample ansible hosts file. Fixed REINPLACE. Only build for python 2.6 due to missing python libraries in 2.7. Added patch to amend sbin_paths variable. Fixed misspelled GAR variables.
Modified Paths:
--------------
csw/mgar/pkg/ansible/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/ansible/trunk/files/0003-Extended-sbin_paths-by-opt-csw-sbin.patch
csw/mgar/pkg/ansible/trunk/files/README.CSW
csw/mgar/pkg/ansible/trunk/files/hosts.CSW
Modified: csw/mgar/pkg/ansible/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ansible/trunk/Makefile 2013-10-01 17:36:28 UTC (rev 22084)
+++ csw/mgar/pkg/ansible/trunk/Makefile 2013-10-01 17:52:43 UTC (rev 22085)
@@ -12,19 +12,29 @@
MASTER_SITES = $(GITHUB_MIRROR)
DISTNAME = $(GITHUB_USER)-$(NAME)-9d5d88b
DISTFILES = $(GITHUB_REFERENCE)$(GITHUB_BALL_EXT)
+DISTFILES += README.CSW
+DISTFILES += hosts.CSW
+PATCHFILES += 0003-Extended-sbin_paths-by-opt-csw-sbin.patch
+
PACKAGES = CSWansible
CATALOGNAME = ansible
-CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/local|root/opt/csw/lib/python2.7/site-packages/ansible/module_common.py
-CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/local|root/opt/csw/lib/python2.7/site-packages/ansible/callbacks.py
-CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/share|root/opt/csw/lib/python2.7/site-packages/ansible/playbook/__init__.py
-CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/share|root/opt/csw/lib/python2.7/site-packages/ansible/runner/__init__.py
CHECKPKG_OVERRIDES_CSWansible += pkgname-does-not-start-with-CSWpy-
CHECKPKG_OVERRIDES_CSWansible += catalogname-does-not-start-with-py_
+# There are many OS specific (Linux, FreeBSD, etc.) paths stored in those files.
+CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/local|root/opt/csw/lib/python2.6/site-packages/ansible/module_common.py
+CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/local|root/opt/csw/lib/python2.6/site-packages/ansible/callbacks.py
+CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/share|root/opt/csw/lib/python2.6/site-packages/ansible/playbook/__init__.py
+CHECKPKG_OVERRIDES_CSWansible += file-with-bad-content|/usr/share|root/opt/csw/lib/python2.6/site-packages/ansible/runner/__init__.py
+
+CHECKPKG_OVERRIDES_CSWansible += surplus-dependency|CSWpy-yaml
+CHECKPKG_OVERRIDES_CSWansible += surplus-dependency|CSWopenssh-client
+CHECKPKG_OVERRIDES_CSWansible += surplus-dependency|CSWpy-jinja2
+
REINPLACEMENTS = etc
REINPLACE_MATCH_etc = /etc/ansible
-REINPLACE_WITH_etc = /opt/csw/ansible
+REINPLACE_WITH_etc = /etc/opt/csw/ansible
REINPLACE_FILES_etc = lib/ansible/constants.py
REINPLACEMENTS += usr
@@ -32,16 +42,16 @@
REINPLACE_WITH_usr = /opt/csw/share/ansible
REINPLACE_FILES_usr = lib/ansible/constants.py
-RUNTIME_PKG_DEPS = CSWpy-jinja2
-RUNTIME_PKG_DEPS += CSWpy-yaml
-RUNTIME_PKG_DEPS += CSWopenssh-client
+RUNTIME_DEP_PKGS = CSWpy-jinja2
+RUNTIME_DEP_PKGS += CSWpy-yaml
+RUNTIME_DEP_PKGS += CSWopenssh-client
ARCHALL = 1
TEST_SCRIPTS =
LICENSE = COPYING
-MODULATIONS_PYTHON_VERSION = 2_7
+MODULATIONS_PYTHON_VERSION = 2_6
include gar/category.mk
@@ -50,4 +60,8 @@
mv $(PKGROOT)/usr/share $(PKGROOT)$(prefix)/share ; \
rmdir $(PKGROOT)/usr || exit 1 ; \
fi
+ if [ ! -d $(PKGROOT)$(sysconfdir)/ansible ] ; then \
+ ginstall -d $(PKGROOT)$(sysconfdir)/ansible ; \
+ fi
+ cp $(FILEDIR)/hosts.CSW $(PKGROOT)$(sysconfdir)/ansible/
@$(MAKECOOKIE)
Added: csw/mgar/pkg/ansible/trunk/files/0003-Extended-sbin_paths-by-opt-csw-sbin.patch
===================================================================
--- csw/mgar/pkg/ansible/trunk/files/0003-Extended-sbin_paths-by-opt-csw-sbin.patch (rev 0)
+++ csw/mgar/pkg/ansible/trunk/files/0003-Extended-sbin_paths-by-opt-csw-sbin.patch 2013-10-01 17:52:43 UTC (rev 22085)
@@ -0,0 +1,25 @@
+From cd7a83573c952d9f8fc63cab2c7f5623663ecff6 Mon Sep 17 00:00:00 2001
+From: Rafael Ostertag <raos at opencsw.org>
+Date: Tue, 1 Oct 2013 16:52:39 +0200
+Subject: [PATCH] Extended sbin_paths by '/opt/csw/sbin'.
+
+---
+ lib/ansible/module_common.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py
+index 55f184f..02aaf56 100644
+--- a/lib/ansible/module_common.py
++++ b/lib/ansible/module_common.py
+@@ -740,7 +740,7 @@ class AnsibleModule(object):
+ - opt_dirs: optional list of directories to search in addition to PATH
+ if found return full path; otherwise return None
+ '''
+- sbin_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin']
++ sbin_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin', '/opt/csw/sbin']
+ paths = []
+ for d in opt_dirs:
+ if d is not None and os.path.exists(d):
+--
+1.8.3.4
+
Added: csw/mgar/pkg/ansible/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/ansible/trunk/files/README.CSW (rev 0)
+++ csw/mgar/pkg/ansible/trunk/files/README.CSW 2013-10-01 17:52:43 UTC (rev 22085)
@@ -0,0 +1,19 @@
+Note
+====
+
+OpenCSW Ansible does not support Paramiko as a connection method, due
+to lack of a Paramiko OpenCSW package. Therefore, OpenCSW Ansible
+requires an SSH implementation supporting ControlPersist
+functionality, which is provided by the OpenCSW OpenSSH Client
+package.
+
+In order to make to make use of the OpenCSW OpenSSH Client, please
+make sure /opt/csw/bin is listed before /usr/bin in your PATH
+environment variable, e.g.
+
+
+ PATH=/opt/csw/bin:$PATH ansible ...
+
+
+Or you might follow the instructions given in the section `Setting
+your PATH' on http://www.opencsw.org/use-it/.
Added: csw/mgar/pkg/ansible/trunk/files/hosts.CSW
===================================================================
--- csw/mgar/pkg/ansible/trunk/files/hosts.CSW (rev 0)
+++ csw/mgar/pkg/ansible/trunk/files/hosts.CSW 2013-10-01 17:52:43 UTC (rev 22085)
@@ -0,0 +1,44 @@
+# This is the default ansible 'hosts' file.
+#
+# It should live in /etc/opt/csw/ansible/hosts
+#
+# - Comments begin with the '#' character
+# - Blank lines are ignored
+# - Groups of hosts are delimited by [header] elements
+# - You can enter hostnames or ip addresses
+# - A hostname/ip can be a member of multiple groups
+
+# Ex 1: Ungrouped hosts, specify before any group headers.
+
+green.example.com
+blue.example.com
+192.168.100.1
+192.168.100.10
+
+# Ex 2: A collection of hosts belonging to the 'webservers' group
+
+[webservers]
+alpha.example.org
+beta.example.org
+192.168.1.100
+192.168.1.110
+
+# If you have multiple hosts following a pattern you can specify
+# them like this:
+
+www[001:006].example.com
+
+# Ex 3: A collection of database servers in the 'dbservers' group
+
+[dbservers]
+
+db01.intranet.mydomain.net
+db02.intranet.mydomain.net
+10.25.1.56
+10.25.1.57
+
+# Here's another example of host ranges, this time there are no
+# leading 0s:
+
+db-[99:101]-node.example.com
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list