facter module: specific alternate facter location?

110 views
Skip to first unread message

Thomas Willert

unread,
Jan 14, 2015, 1:35:46 PM1/14/15
to ansible...@googlegroups.com
Hi,
is it possible to specify another location for the facter binary when using the "facter" module?

From this error message I gather that the module is relying on "/usr/bin/env" to find the facter binary:

# ansible xxxxxxxx -m facter
xxxxxxxx | FAILED >> {
    "cmd": "/usr/bin/env facter --json",
    "failed": true,
    "msg": "/usr/bin/env: facter: No such file or directory",
    "rc": 127,
    "stderr": "/usr/bin/env: facter: No such file or directory\n",
    "stdout": ""
}

We have our facter binary in "/opt/puppet/bin/facter" (which is also the normal location if using the PE Puppet stack).

Is it possible to either pass an alternate facter binary to the module? 
Or is it possible to pass a parameter to "/usr/bin/env" through the facter module?

Thanks for your help,
Thomas

Brian Coca

unread,
Jan 14, 2015, 2:30:04 PM1/14/15
to ansible...@googlegroups.com
you can add this to your task:

environment:
PATH: /opt/puppet/bin

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages