When writing modules, is it required that then entry point be named init.pp?

I have written a module and if I try to call the module via nodes.pp from a
file named other than init.pp, I get an error that the module cannot be
found.  If I rename the file to init.pp, it works fine.

So, can someone clarify, is the naming of the file a requirement?

ssh.pp

class ssh::hostkeys{
        @@sshkey { "${fqdn}_dsa":
                host_aliases  => [ "$fqdn", "$hostname", "$ipaddress" ],
                type          => dsa,
                key           => $sshdsakey,
}
        @@sshkey { "${fqdn}_rsa":
                host_aliases  => [ "$fqdn", "$hostname", "$ipaddress" ],
                type          => rsa,
                key           => $sshrsakey,
}
Sshkey <<| |>>
}


_________________________________________________________

init.pp


class ssh::hostkeys{
        @@sshkey { "${fqdn}_dsa":
                host_aliases  => [ "$fqdn", "$hostname", "$ipaddress" ],
                type          => dsa,
                key           => $sshdsakey,
}
        @@sshkey { "${fqdn}_rsa":
                host_aliases  => [ "$fqdn", "$hostname", "$ipaddress" ],
                type          => rsa,
                key           => $sshrsakey,
}
Sshkey <<| |>>
}
_____________________________________________________________

nodes.pp

node 'default' {

      include test
      include motd
      #include sudoers
      include user::virtual
      include user::developers
      include ssh::hostkeys
      include ssh::knownhosts
      }

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to