syntax issue over puppet_4

17 views
Skip to first unread message

Ren

unread,
Feb 22, 2017, 2:02:26 PM2/22/17
to Puppet Users
Hi all, I'm hoping you can point out some detail I'm missing. Puppet agent seems to fail with manifest working fine with puppet3 but not for puppet4.

Thank you .

Error: Failed to apply catalog: Could not find dependency Package[openssh-server] for File[/etc/ssh/sshd_config] at   modules/sshd/manifests/init.pp:14



class sshd {
   
case $::operatingsystem {
       
/(CentOS|Scientific|OracleLinux|OpenSuSE)/: {
            $ssh_pkg
= "openssh"
            $ssh_svc
= "sshd"
       
}
       
/(Debian|Solaris|Ubuntu)/: {
            $ssh_pkg
= "openssh-server"
            $ssh_svc
= "ssh"
       
}
   
}

   
# Special sshd_config
    file
{'/etc/ssh/sshd_config':
       
ensure => present,
        mode
=> '0600',
       
require => Package[$ssh_pkg],
        source
=> $application ? {
           
"jump" => "puppet:///modules/sshd/sshd_config.jump",
           
"git" => "puppet:///modules/sshd/sshd_config.gitolite",
           
default => "puppet:///modules/sshd/sshd_config.default"
       
},
        notify
=> Service[$ssh_svc];
   
}

    service
{$ssh_svc:
       
ensure => running,
       
require => Package[$ssh_pkg],
        enable
=> true;
   
}
}


Dirk Heinrichs

unread,
Feb 22, 2017, 2:29:54 PM2/22/17
to puppet...@googlegroups.com
Am 22.02.2017 um 14:28 schrieb Ren:

Error: Failed to apply catalog: Could not find dependency Package[openssh-server] for File[/etc/ssh/sshd_config] at   modules/sshd/manifests/init.pp:14

It's not declared (package {$ssh_pkg: ...}). Wondering why it worked in P3...

Bye...

    Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenTextTM Discovery | Recommind
Email: dirk.he...@recommind.com
Website: www.recommind.de

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Ren

unread,
Feb 22, 2017, 2:45:32 PM2/22/17
to Puppet Users, dhei...@opentext.com
yeah you absolutely right ! thank you.  now it works. 
am still discovering puppet.
Reply all
Reply to author
Forward
0 new messages