Groups
Sign in
Groups
Puppet Users
Conversations
About
Send feedback
Help
Getting puppet bolt to work with facts
25 views
Skip to first unread message
Andy Hall
unread,
Aug 12, 2024, 7:06:27 AM
Aug 12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
So I have a plan where I get facts...here is the relevant section...
$target_facts = run_plan('facts', 'targets' => $targets)
$target_facts.each |$result| {
$target = $result['target']
$targetfacts = $result['value']
$os_release = $targetfacts['os']['release']['major']
$kernel_version = $targetfacts['kernelrelease']
But I get this error...
Evaluation Error: Operator '[]' is not applicable to an Undef Value.
This is referring to the following line which attempts to assign a fact...
$os_release = $targetfacts['os']['release']['major']
Any ideas what I am doing wrong here ?
Thanks.
Reply all
Reply to author
Forward
0 new messages