Hey all,

 Sorry but I forgot to include a key piece of information in that last
email.

 In the ssh class I have defined in the modules init.pp I had this
definition:

 class ssh {
      include ssh::install, ssh::config, ssh::service, ssh::params
}


But then I read on into the book a little more and found out about the
require function. So I changed the ssh class definition to this:

class ssh {
      require ssh::params
      include ssh::install, ssh::config, ssh::service
}

And that solved the problem! Still curious as to why the original class
definition failed to work with the include function specifying ssh::params.
So if anyone out there cares to enlighten on that issue, that'd be great.

Glad however that I was able to get this working.

Thanks!
Tim


On Tue, Jan 21, 2014 at 11:22 PM, Tim Dunphy <[email protected]> wrote:

> Hello all,
>
>  I'm attempting to follow along in the puppet book with the ssh module
> lesson. I'm at the part where I'm attempting to use a variable that's been
> set in another class called ssh::params. When I run the puppet on the
> client I get the following error:
>
> [root@beta:~] #puppet agent --test --server puppet.mydomain.com
> info: Caching catalog for beta.mydomain.com <http://beta.jokefire.com>
> err: Failed to apply catalog: Parameter path failed on File[undef]: File
> paths must be fully qualified, not 'undef' at
> /etc/puppet/modules/ssh/manifests/config.pp:10
>
> This is what my ssh modules directory looks like:
>
> modules/ssh
> ├── files
> │   └── sshd_config
> ├── manifests
> │   ├── config.pp
> │   ├── init.pp
> │   ├── install.pp
> │   ├── params.pp
> │   └── service.pp
> └── templates
>
>
> Here is the definition I have setup in my config.pp manifest that is
> generating the error:
>
> class ssh::config {
>      file { $ssh::params::ssh_service_config:
>       ensure => present,
>       owner => 'root',
>       group => 'root',
>       mode => 0600,
>       source => "puppet:///modules/ssh/sshd_config",
>       require => Class["ssh::install"],
>       notify => Class["ssh::service"],
>       }
> }
>
>
> The  $ssh::params::ssh_service_config variable is what's throwing the
> undefined error when I run puppet on the client.
>
> And this is my config.pp manifest in which that variable is defined:
>
> class ssh::params {
>     case $operatingsystem {
>      Solaris: {
>        $ssh_package_name = 'openssh'
>        $ssh_service_config = '/etc/ssh/sshd_config'
>        $ssh_service_name = 'sshd'
>      }
>      /(Ubuntu|Debian)/: {
>         $ssh_package_name = 'openssh-server'
>         $ssh_service_config = '/etc/ssh/sshd_config'
>         $ssh_service_name = 'sshd'
>      }
>      /(RedHat|CentOS|Fedora)/: {
>         $ssh_package_name = 'openssh-server'
>         $ssh_service_config = '/etc/ssh/sshd_config'
>         $ssh_service_name = 'sshd'
>      }
>   }
> }
>
>
>
> I was hoping someone out there could help determine why this variable is
> undef?
>
> Thanks,
> Tim
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0ekZxVD%3DDwjaa%3DeC8VwCnPoORSNE0PaDn-dyF05ymd8reg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to