unable to retrieve the puppet master FQDN from puppet plans

17 views
Skip to first unread message

Vinay Korrapati

unread,
Nov 19, 2020, 10:38:57 AM11/19/20
to Puppet Users
Hi Team,

I am unable to retrieve the puppet master FQDN through plans. Below are the steps taken so far:

1. 
    $puppet_master_details = run_plan('facts', 'nodes' => 'localhost')
    $puppet_master_results = $puppet_master_details.results
    $puppet_master = $puppet_master_results[0]['fqdn']
    return $puppet_master

tried with all the : nodes/target/targets. Getting below error :
"msg" : "Evaluation Error: Unknown variable: 'facts'.

2. $puppet_master = get_targets($host)[0]
unable to find the host variable.

3. $puppet_master = system::env('hostname')

None of the ways were worked. Kindly share your inputs to achieve this. 
Reply all
Reply to author
Forward
0 new messages