summaryrefslogtreecommitdiff
path: root/sysutils/ansible/patches/patch-library_setup
blob: e7267aa42be0943fb3da268cb166d2a5c5178f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$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)