Ask Your Question
0

Access Remote Facts

asked 2017-11-14 12:27:36 -0600

annihil8ted gravatar image

Because puppet doesn't allow client to master transferring of files, I was planning to use custom facts to get some client node files. I'm wondering how I can access facts on a remote client from the puppet master.

edit retag flag offensive close merge delete

Comments

Err, ssh? You ever heard of ssh(1), haven't you? … Hold on, what do you wanna do? Where do you need to access the fact? In a manifest you just write $factname. Can't'ya just mount your central file server on the master machine, can ya? You don't really need to transfer _whole_ files, do you?

Kai Burghardt gravatar imageKai Burghardt ( 2017-11-15 13:23:50 -0600 )edit

I'm not sure, but maybe you can export your file: https://puppet.com/docs/puppet/latest/lang_exported.html .

Kai Burghardt gravatar imageKai Burghardt ( 2017-11-15 13:31:09 -0600 )edit

An exec SSH would be the easiest however that would require another account to be made. I was hoping to make use of existing puppet funtionaliy or hack together some puppet functionality to allow for data collection from a client to the master.

annihil8ted gravatar imageannihil8ted ( 2017-12-05 09:24:05 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-03-24 13:29:57 -0600

Spindizzy gravatar image

I think you want the

puppet facts find --terminus facter

command. Write your custom facts, get them installed by puppet, then on the master, you can use the above command (possibly with other options), and the node name, to retrieve the facts from the agent. I'm using this command in combination with bolt and a perl script to retrieve facts from a bunch of nodes managed by different masters.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-11-14 12:27:36 -0600

Seen: 892 times

Last updated: Mar 24