Puppet Masterless, Facter not accessible.

30 views
Skip to first unread message

vishanth bharadwaj

unread,
Apr 2, 2019, 4:20:36 PM4/2/19
to Packer
Hi All,
I pass arguments like:
"facter" : {"foo":"bar"} 
for puppet masterless 
My OS containes puppet in it as specified in the readme in packer.io

when I go and type 
notify{$operatingsystemrelease:}

I get 6.10 (using centos)

notify{$foo:}
I should be getting bar where as I get undefined.

Any help is appreciated. Thanks 

Rickard von Essen

unread,
Apr 3, 2019, 3:45:52 AM4/3/19
to packe...@googlegroups.com
What's your full puppet-masterless config? Can you access the default fact $packer_build_name?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/3d5e9311-f36a-49e4-854f-a8b207f5fe74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vishanth bharadwaj

unread,
Apr 3, 2019, 1:29:35 PM4/3/19
to Packer
Hi Rickard, thanks for the reply.
I am also not able to access the default $packer_build_name.

For the config file --> vi /etc/puppet/puppet.conf 

I have following records present.
[main]
logdir = ***
rundir = ***
ssldir = ***

[agent]
classfile = ****
localconfig = ****

I do not have a factdir is that the reason? 


On Wednesday, April 3, 2019 at 12:45:52 AM UTC-7, Rickard von Essen wrote:
What's your full puppet-masterless config? Can you access the default fact $packer_build_name?

On Tue, Apr 2, 2019 at 10:20 PM vishanth bharadwaj <vishanth...@gmail.com> wrote:
Hi All,
I pass arguments like:
"facter" : {"foo":"bar"} 
for puppet masterless 
My OS containes puppet in it as specified in the readme in packer.io

when I go and type 
notify{$operatingsystemrelease:}

I get 6.10 (using centos)

notify{$foo:}
I should be getting bar where as I get undefined.

Any help is appreciated. Thanks 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.

Rickard von Essen

unread,
Apr 3, 2019, 3:21:28 PM4/3/19
to packe...@googlegroups.com
How does your packer template look like, especially the puppet-masterless part. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/cc49caa1-63a1-415f-867d-357ee53f798b%40googlegroups.com.

vishanth bharadwaj

unread,
Apr 3, 2019, 3:34:49 PM4/3/19
to Packer

{
      "type": "puppet-masterless",
      "only" : [
        "template"
      ],
      "manifest_file":"scripts/modules/packer_manifest/manifests/init.pp",
}

The puppet part, I removed the facter part as I need to access the default one like $packer_build_name is also not accessible.
My packer machine does not have *facter* installed in it 

Rickard von Essen

unread,
Apr 3, 2019, 4:17:01 PM4/3/19
to packe...@googlegroups.com
I think you should have facter installed. It's supposed to be bundled with puppet according to the docs. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6c1f629a-fe5b-4daa-8ba0-7f9cee78637a%40googlegroups.com.

vishanth bharadwaj

unread,
Apr 4, 2019, 1:36:14 PM4/4/19
to Packer
Yes Rickard you are correct, I investigated and found the solution that aligns to our discussion. Thanks for the help. Problem solved!!!!!!
Reply all
Reply to author
Forward
0 new messages