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

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAOZy0emZyPXnAaiiNf%3D74_d9JUn0j7ueJg7BCzn9hPPJBPKeXg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to