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.