summaryrefslogtreecommitdiff
path: root/sysutils/ansible/patches/patch-library_setup
blob: e1ebf57fcee8f3d65c35b073fd8dbc846d959c15 (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.2 2013/04/13 17:51:57 riz Exp $

--- 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:
@@ -111,7 +111,7 @@
                  { 'path' : '/usr/bin/zypper',      'name' : 'zypper' },
                  { '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
 
-    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)
@@ -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)
 
-    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)