Puppet Error

34 views
Skip to first unread message

MASS

unread,
Oct 8, 2014, 2:38:13 PM10/8/14
to puppet...@googlegroups.com
I'm getting the following error when I run this Puppet ssh code on Freebsd.  Note, the code runs fine on Linux.  Any ideas?  

Debug: Service[params::sshd_service](provider=freebsd): Could not find params::sshd_service in /etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find params::sshd_service in /usr/local/etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find params::sshd_service.sh in /etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find params::sshd_service.sh in /usr/local/etc/rc.d
Error: /Stage[main]/Puppet-ssh::Service/Service[params::sshd_service]: Could not evaluate: Could not find init script for 'params::sshd_service'
Debug: /Schedule[puppet]: Skipping device resources because running on a host
Stage[main]: Would have triggered 'refresh' from 1 events


Here are some snippets from the module...

# Class: puppet-ssh::params
class puppet-ssh::params {
      $sshd_config        = '/etc/ssh/sshd_config'
      $ssh_config         = '/etc/ssh/ssh_config'
      $sshd_service       = 'sshd'
}


# Class: puppet-ssh::service
class puppet-ssh::service {
  case $::operatingsystem {
    redhat: {
      service { params::sshd_service:
        ensure => 'running',
        enable => true,
      }
    }
    freebsd: {
      service { params::sshd_service:
        ensure => 'running',
        enable => true,
      }
    }
    aix: {
      service { params::sshd_service:
        ensure => 'running',
        enable => true,
      }
    }
    default: {
      fail("The SSH module could not find '${::operatingsystem}' parameters.")
    }
  }
}

Juan Andres Ramirez

unread,
Oct 8, 2014, 3:20:14 PM10/8/14
to puppet...@googlegroups.com
Maybe??

service { 'sshd':
      ensure    => running,
      enable    => true,
      subscribe => File['/etc/ssh/sshd_config'],
    }

Stephen Marlow

unread,
Oct 8, 2014, 4:09:22 PM10/8/14
to puppet...@googlegroups.com
It appears to be interpreting params::sshd_service as a literal. Have you tried prefixing it with a $ or fully qualifying it, e.g. $puppet-ssh::params::sshd_service?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/4bf95c2c-4755-4e8b-8a8c-66a57c4af290%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages