CVQuesty
06/08/2022, 2:46 PMSlackbot
06/08/2022, 3:02 PMsimonhoenscheid
06/08/2022, 4:01 PMSlackbot
06/08/2022, 4:23 PMSlackbot
06/08/2022, 5:08 PMgreglarkin
06/08/2022, 5:11 PMJason Grammenos
06/08/2022, 6:02 PM$query = $node_hostnames.map |$node| { "certname='${node}'" }
using this data:
mm::node_hostnames:
- 'hostname1.internal'
- 'hostname2.internal'
will i get an array
$query == ["certname='hostname1.internal'",""certname='hostname2.internal'""]
Jason Grammenos
06/08/2022, 6:02 PMLumiere
06/08/2022, 6:06 PMSkylar Thompson
06/08/2022, 6:06 PMLumiere
06/08/2022, 6:06 PMJason Grammenos
06/08/2022, 6:07 PMgreglarkin
06/08/2022, 6:43 PMpuppet apply
for testing programming constructs with no resources involved, and I haven't used it as much, but I'll bet you can do the same in https://demo.puppet-debugger.com/.
I create small .pp files like so:
$node_hostnames = [ 'hostname1.internal', 'hostname2.internal' ]
$query = $node_hostnames.map |$node| { "certname='${node}'" }
notice($query)
greglarkin
06/08/2022, 6:43 PMpuppet apply /tmp/maptest.pp
to see output:
Notice: Scope(Class[main]): [certname='hostname1.internal', certname='hostname2.internal']
Notice: Compiled catalog for gregs-macbook-pro.local in environment production in 0.04 seconds
Notice: Applied catalog in 0.02 seconds
greglarkin
06/08/2022, 6:44 PMSlackbot
06/08/2022, 6:52 PMnwops
06/08/2022, 7:36 PMunable to get certificate crl puppet
Slackbot
06/09/2022, 4:33 AMDr Bunsen Honeydew
06/09/2022, 11:45 AMSlackbot
06/09/2022, 12:44 PMDr Bunsen Honeydew
06/09/2022, 12:44 PMSlackbot
06/09/2022, 12:51 PMglee
06/09/2022, 12:53 PMepp()
function not template()
glee
06/09/2022, 12:54 PMepp()
function not template()
glee
06/09/2022, 12:54 PMMoe
06/09/2022, 12:55 PMepp()
and got new error messages. I'll try to figure them out first and if I hit a wall I might return 🙂Yury Bushmelev
06/09/2022, 12:58 PMMoe
06/09/2022, 12:59 PMSlackbot
06/09/2022, 12:59 PMMoe
06/09/2022, 1:34 PM