Chaging my ENC to output this, adding double quotes:
nfs_mounts:
- ["/data", "fas3319-518.uis.georgetown.edu:/vol/onecrddb_data/test"]
and adding a notice($nfs_mounts) to the manifests, gives this log:
[daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts:
/datafas3319-518.example.com:/vol/onecrddb_data/test
[daemon.notice] (Scope(Class[Gu_misc])) nfs_mounts: /data
fas3319-518.example.com:/vol/onecrddb_data/test
[daemon.err] name is not an hash or array when accessing it with 0 at
/etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
on node nodename.example.com
[daemon.err] name is not an hash or array when accessing it with 0 at
/etc/puppet/environments/production_ml623/modules/gu_misc/manifests/init.pp:68
on node nodename.example.com
On Mon, Feb 27, 2012 at 4:17 PM, Mohamed Lrhazi <[email protected]> wrote:
> From my ENC, I return something like, for a given node:
>
> nfs_mounts:
> - [/data, fas3319-518.example.com:/vol/crddb_data/test]
>
> and in my manifests I added:
>
> define mount_nfs_shares() {
> $mount_point = $name[0]
> $mount_device = $name[1]
>
> notice("mount_point: ",$mount_point)
> notice("mount_device: ",$mount_device)
>
> file{ $mout_point: ensure => directory }
> mount { $mount_point:
> device => $mount_device,
> name => $mount_point,
> require => File[$mount_point],
> }
> }
> mount_nfs_shares { $nfs_mounts: }
>
> This results in error:
>
>
> Feb 27 16:10:07 pirates puppet-master[16073]: [daemon.err] Could not
> find node 'nodename.example.com'; cannot compile
>
> The idea of course is for me to be able to specify for each node, in
> my ENC, a list of NFS mount it needs, and have the corresponding
> puppet resources created and compiled for each.
>
> Why is this not working? And what would be better way of achieve my goal?
>
> Thanks a lot,
> Mohamed.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.