Issue #13212 has been updated by Tomas Doran.

We also have this issue.

My code looks like this:

node "xxxx.mgmt.net.local" {
   include server::default-mgmt-net-local
   include restrictedlists::sftp_clients
 }

class restrictedlists::sftp_clients {
    include restrictedlists
    $data = hiera('enc/restrictedlists')
    restrictedlists::create { $data: }
}

define restrictedlists::create {
  $client_name = $name["name"]
  $client_uid  = $name["uid"]
  $tim_username = $name["tim_username"]
  $tim_pass = $name["tim_password"]
  $sshkey = $name["sshkey"]
  $cidr = $name["cidr"]

  # Code which actually defines resources here
}

Puppet refuses to run for the first time, at all with this error.

If if comment out the 'include restrictedlists::sftp_clients' line, then puppet 
will run fine, and subsequently un-commenting this line (after the first run) 
results in the code working as expected.

----------------------------------------
Bug #13212: Pass array to custom define fails
https://projects.puppetlabs.com/issues/13212#change-68490

Author: Juan José Presa Rodal
Status: Needs More Information
Priority: Normal
Assignee: 
Category: parser
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


I'm trying to pass a simple array to a custom define and fails with error:

`err: Could not retrieve catalog from remote server: Could not intern from 
pson: Could not convert from pson: Could not find relationship source 
"Foo::Map[idbazip2.2.2.2]"
`

I think that code is very correct:


`$foo = [{"id" => "bar", "ip" => "1.1.1.1"}, {"id" => "baz", "ip" => 
"2.2.2.2"}]`

`foo::map {$foo:}`

`define foo::map () {
  notify {$name['id']:
  }
}
`


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to