Dear John and all,

Am 15.11.2013 um 15:47 schrieb jcbollinger <[email protected]>:
> 
> On Thursday, November 14, 2013 5:32:50 AM UTC-6, Patricia Jung wrote:
> 
> http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html does 
> not suggest to me that nested parametrized defines would be forbidden
> 
> 
> You are correct.  Defined type bodies may declare resources of any type, 
> including defined types.
> 
>  
> , hence I expected the following code to work: 
> 
> add_to_ssh_authorized_keys.pp: 
> -------- 
> define a::ssh_keys::add_to_ssh_authorized_keys($homebasedir="/home", 
> $targetuser="root", $keyowner, $keyownername, $state="present" ) { 
> 
> 
> To be clear, that should appear in <module 
> path>/a/manifests/ssh_keys/add_to_ssh_authorized_keys.pp in order for the 
> autoloader to be able to find it.
Yes, this is true: it's located in 
/etc/puppet/modules/a/manifests/ssh_keys/add_to_ssh_authorized_keys.pp
> 
> 
>  
> it_services_admins.pp: 
> --------- 
> define a::ssh_keys::it_services_admins($user='root'){ 
> 
> 
> Likewise, that should appear in <module 
> path>/a/manifests/ssh_keys/it_services_admins.pp
This file is located in 
etc/puppet/modules/a/manifests/ssh_keys/it_services_admins.pp
> 
> 
>  
> 
>     censhare::ssh_keys::add_to_ssh_authorized_keys{ "$user-blah": 
Sorry, my fault, the line above reads
        a::ssh_keys::add_to_ssh_authorized_keys{ "$user-blah": 
> 
>         targetuser => "$user", 
>         keyowner => 'blah', 
>         keyownername => 'blah', 
>     }  
> } 
> 
> --------- 
> 
> class file: 
> 
> 
> I suppose you mean that this is the file of the module main class, <module 
> path>/<module_name>/manifests/init.pp
> 
>  
Not necessarily init.pp, and it's outside the a module, e.g.:
/etc/puppet/modules/c/manifests/nodes/saas.pp. Perhaps this is the problem?
> ------------ 

   class c::nodes::saas{
       a::ssh_keys::it_services_admins{ 'b': 
              user => 'b' 
       }
       a::ssh_keys::it_services_admins{ 'root':
             user => 'root'
       } 
   }

The error message reads:

Invalid resource type a::ssh_keys::add_to_ssh_authorized_keys at 
/etc/puppet/modules/a/manifests/ssh_keys/:7" 
> 

> Have you attempted to obfuscate the manifest fragments you presented?  
Sorry -- my intention was to strip the problem down mentally, and I admit to 
have failed… 

Thanks for helping anyway!

    Patricia

-- 
Patricia Jung 
Senior Software and Support Engineer 

censhare AG
Paul-Gerhardt-Allee 50, 81245 Muenchen, Germany
Fon +49 89 568236-311 
Fax +49 89 568236-501
http://www.censhare.com
http://blog.censhare.com
Vorstand: Walter Bauer, Robert Motzke, Dieter Reichert
Aufsichtsratsvorsitzender: Matthias Zimmermann 
Handelsregister: Amtsgericht Muenchen HRB 140617
USt-ID: DE219222021


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7703E42A-DEBC-4C89-8853-2103151F5F23%40censhare.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to