Puppet Learning VM - Resource Ordering Quest - Task 6/6

168 views
Skip to first unread message

Luke Anderson

unread,
Jun 2, 2015, 8:41:29 AM6/2/15
to puppet...@googlegroups.com
Hi,

Firstly, apologies if i have started a duplicate topic, this is my first post & I couldn't find a topic that matches my question...

I ran into a problem when working on the Ordering quest in the Puppet Learning VM. It is when managing the sshd service, during the final task number 6 the quest asks you to complete the following; "The sshd/manifests/init.pp manifest should should define the sshd class". I have followed along and cannot see any issues with my manifest, however when applying the manifest it doesn't do anything, and the task is not completed.

My 'sshd/manifests/init.pp' manifest file looks like this:

 1  class sshd {
 2
 3     package { 'openssh-server':
 4       ensure   =>   present,
 5       before    =>   File['/etc/ssh/sshd_config'],
 6     }
 7
 8     file { '/etc/ssh/sshd_config':
 9       ensure    =>    file,
 10     mode      =>    600,
 11     source    =>    'puppet:///modules/sshd/sshd_config',
 12   }
 13
 14   service { 'sshd':
 15     ensure      =>    running,
 16     enable      =>    true,
 17     subscribe  =>    File['/etc/ssh/sshd_config'],
 18   }
 19
 20 }

and my 'sshd/tests/init.pp' manifest looks like:

1 include 'sshd'

The puppet parser tool returns no syntax errors, however when using 'puppet apply sshd/tests/init.pp' nothing seems to happen;

[root@learning /etc/puppetlabs/puppet/environments/production/modules]# puppet apply sshd/tests/init.pp
Notice: Compiled catalog for learning.puppetlabs.vm in environment production in 0.83 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in <module:Puppet>')
Notice: Finished catalog run in 0.63 seconds
[root@learning /etc/puppetlabs/puppet/environments/production/modules]#

Please can anyone point me in the right direction?

Again, apologies if I have posted in the wrong location, feel free to direct me to the correct place.

Thanks
LA


Edouard Fazenda

unread,
Jun 2, 2015, 9:39:38 AM6/2/15
to puppet...@googlegroups.com
Hi Luke,

This is also my first post :) But maybe I can help you.

So I have created the same class 'sshd' as you.

Here the structure : 

[vagrant@vm01 modules]$ pwd
/etc/puppet/modules
[vagrant@vm01 modules]$ tree
.
└── sshd
    ├── files
    │   └── sshd_config
    ├── manifests
    │   └── init.pp
    └── tests
        └── init.pp

4 directories, 3 files

And I have run the init.pp in the test directory with puppet apply while putting the --modulepath option.

This option can be added in your puppet.con located in the /etc/puppet/ directory.

[vagrant@vm01 ~]$ sudo puppet apply --modulepath="/etc/puppet/modules/" /etc/puppet/modules/sshd/tests/init.pp
Notice: Compiled catalog for vm01.v.cablecom.net in environment production in 0.53 seconds
Notice: /Stage[main]/Sshd/File[/etc/ssh/sshd_config]/content: content changed '{md5}3bdf2cc35b8e94d3ec2440b921db1728' to '{md5}d41d8cd98f00b204e9800998ecf8427e'
Notice: /Stage[main]/Sshd/Service[sshd]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 0.52 seconds

You're puppet code is valid and execute without error.

Hope this help ! 

Cheers, Edouard.

--
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/ccce60b1-f98e-4ecf-9909-32d602dab7f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
________________________________________
Edouard Fazenda
Tel : 0688451444

Dan White

unread,
Jun 2, 2015, 9:44:15 AM6/2/15
to puppet...@googlegroups.com
Add the debug flag (--debug) and see what you get.
Also, put a dummy notify resource in your module file to get an indication that it is being processed.

Like this : 
                   notify {'here I am': }
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”  (Bill Waterson: Calvin & Hobbes)

Luke Anderson

unread,
Jun 4, 2015, 11:43:23 AM6/4/15
to puppet...@googlegroups.com
Hi,

Output of "puppet apply 'sshd/tests/init.pp' --debug" is below:

 [0;36mDebug: Runtime environment: puppet_version=3.7.3 (Puppet Enterprise 3.7.1), ruby_version=1.9.3, run_mode=user, default_encoding=UTF-8 [0m
 [0;36mDebug: Loading external facts from /var/opt/lib/pe-puppet/facts.d [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/concat/lib/facter/concat_basedir.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/staging/lib/facter/staging_windir.rb [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/staging/lib/facter/staging_http_get.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/stdlib/lib/facter/pe_version.rb [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/stdlib/lib/facter/puppet_vardir.rb [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/stdlib/lib/facter/root_home.rb [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/stdlib/lib/facter/facter_dot_d.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/mysql/lib/facter/mysql_version.rb [0m
 [0;36mDebug: Loading facts from /etc/puppetlabs/puppet/environments/production/modules/mysql/lib/facter/mysql_server_id.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/pe_staging/lib/facter/staging_http_get.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/puppet_enterprise/lib/facter/custom_auth_conf.rb [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/puppet_enterprise/lib/facter/pe_build.rb [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/puppet_enterprise/lib/facter/platform_tag.rb [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/puppet_enterprise/lib/facter/pe_version.rb [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/puppet_enterprise/lib/facter/windows.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /opt/puppet/share/puppet/modules/pe_concat/lib/facter/pe_concat_basedir.rb [0m
 [0;32mInfo: Loading facts [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/pe_build.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/platform_tag.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/pe_version.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/root_home.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/staging_windir.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/mysql_version.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/windows.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/mysql_server_id.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/staging_http_get.rb [0m
 [0;36mDebug: Loading facts from /var/opt/lib/pe-puppet/lib/facter/pe_concat_basedir.rb [0m
 [0;36mDebug: importing '/etc/puppetlabs/puppet/environments/production/modules/sshd/manifests/init.pp' in environment production [0m
 [0;36mDebug: Automatically imported sshd from sshd into production [0m
 [0;36mDebug: Executing '/bin/rpm --version' [0m
 [0;36mDebug: Executing '/bin/rpm -ql rpm' [0m
 [0;36mDebug: Executing '/bin/rpm --version' [0m
 [mNotice: Compiled catalog for learning.puppetlabs.vm in environment production in 0.96 seconds [0m
 [0;36mDebug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portupgrade does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/portupgrade does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist [0m
 [0;36mDebug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderSystemd: file systemctl does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist [0m
 [0;36mDebug: Puppet::Type::Service::ProviderOpenrc: file /bin/rc-status does not exist [0m
 [0;36mDebug: Creating default schedules [0m
 [0;36mDebug: Using settings: adding file resource 'confdir': 'File[/etc/puppetlabs/puppet]{:path=>"/etc/puppetlabs/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Puppet::Type::User::ProviderLdap: true value when expecting false [0m
 [0;36mDebug: Puppet::Type::User::ProviderPw: file pw does not exist [0m
 [0;36mDebug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist [0m
 [0;36mDebug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist [0m
 [0;36mDebug: Puppet::Type::Group::ProviderLdap: true value when expecting false [0m
 [0;36mDebug: Puppet::Type::Group::ProviderPw: file pw does not exist [0m
 [0;36mDebug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist [0m
 [0;36mDebug: Using settings: adding file resource 'vardir': 'File[/var/opt/lib/pe-puppet]{:path=>"/var/opt/lib/pe-puppet", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'logdir': 'File[/var/log/pe-puppet]{:path=>"/var/log/pe-puppet", :mode=>"750", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'statedir': 'File[/var/opt/lib/pe-puppet/state]{:path=>"/var/opt/lib/pe-puppet/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'rundir': 'File[/var/run/pe-puppet]{:path=>"/var/run/pe-puppet", :mode=>"755", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'libdir': 'File[/var/opt/lib/pe-puppet/lib]{:path=>"/var/opt/lib/pe-puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'hiera_config': 'File[/etc/puppetlabs/puppet/hiera.yaml]{:path=>"/etc/puppetlabs/puppet/hiera.yaml", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'certdir': 'File[/etc/puppetlabs/puppet/ssl/certs]{:path=>"/etc/puppetlabs/puppet/ssl/certs", :mode=>"755", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'ssldir': 'File[/etc/puppetlabs/puppet/ssl]{:path=>"/etc/puppetlabs/puppet/ssl", :mode=>"771", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'publickeydir': 'File[/etc/puppetlabs/puppet/ssl/public_keys]{:path=>"/etc/puppetlabs/puppet/ssl/public_keys", :mode=>"755", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'requestdir': 'File[/etc/puppetlabs/puppet/ssl/certificate_requests]{:path=>"/etc/puppetlabs/puppet/ssl/certificate_requests", :mode=>"755", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'privatekeydir': 'File[/etc/puppetlabs/puppet/ssl/private_keys]{:path=>"/etc/puppetlabs/puppet/ssl/private_keys", :mode=>"750", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'privatedir': 'File[/etc/puppetlabs/puppet/ssl/private]{:path=>"/etc/puppetlabs/puppet/ssl/private", :mode=>"750", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'hostcert': 'File[/etc/puppetlabs/puppet/ssl/certs/learning.puppetlabs.vm.pem]{:path=>"/etc/puppetlabs/puppet/ssl/certs/learning.puppetlabs.vm.pem", :mode=>"644", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'hostprivkey': 'File[/etc/puppetlabs/puppet/ssl/private_keys/learning.puppetlabs.vm.pem]{:path=>"/etc/puppetlabs/puppet/ssl/private_keys/learning.puppetlabs.vm.pem", :mode=>"640", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'hostpubkey': 'File[/etc/puppetlabs/puppet/ssl/public_keys/learning.puppetlabs.vm.pem]{:path=>"/etc/puppetlabs/puppet/ssl/public_keys/learning.puppetlabs.vm.pem", :mode=>"644", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'localcacert': 'File[/etc/puppetlabs/puppet/ssl/certs/ca.pem]{:path=>"/etc/puppetlabs/puppet/ssl/certs/ca.pem", :mode=>"644", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'hostcrl': 'File[/etc/puppetlabs/puppet/ssl/crl.pem]{:path=>"/etc/puppetlabs/puppet/ssl/crl.pem", :mode=>"644", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'statefile': 'File[/var/opt/lib/pe-puppet/state/state.yaml]{:path=>"/var/opt/lib/pe-puppet/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'clientyamldir': 'File[/var/opt/lib/pe-puppet/client_yaml]{:path=>"/var/opt/lib/pe-puppet/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'client_datadir': 'File[/var/opt/lib/pe-puppet/client_data]{:path=>"/var/opt/lib/pe-puppet/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'resourcefile': 'File[/var/opt/lib/pe-puppet/state/resources.txt]{:path=>"/var/opt/lib/pe-puppet/state/resources.txt", :mode=>"640", :owner=>"root", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'clientbucketdir': 'File[/var/opt/lib/pe-puppet/clientbucket]{:path=>"/var/opt/lib/pe-puppet/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'lastrunfile': 'File[/var/opt/lib/pe-puppet/state/last_run_summary.yaml]{:path=>"/var/opt/lib/pe-puppet/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'lastrunreport': 'File[/var/opt/lib/pe-puppet/state/last_run_report.yaml]{:path=>"/var/opt/lib/pe-puppet/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'graphdir': 'File[/var/opt/lib/pe-puppet/state/graphs]{:path=>"/var/opt/lib/pe-puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Using settings: adding file resource 'pluginfactdest': 'File[/var/opt/lib/pe-puppet/facts.d]{:path=>"/var/opt/lib/pe-puppet/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/lib]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/hiera.yaml]: Autorequiring File[/etc/puppetlabs/puppet] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/certs]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl]: Autorequiring File[/etc/puppetlabs/puppet] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/public_keys]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/private_keys]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/private]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/certs/learning.puppetlabs.vm.pem]: Autorequiring File[/etc/puppetlabs/puppet/ssl/certs] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/private_keys/learning.puppetlabs.vm.pem]: Autorequiring File[/etc/puppetlabs/puppet/ssl/private_keys] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/public_keys/learning.puppetlabs.vm.pem]: Autorequiring File[/etc/puppetlabs/puppet/ssl/public_keys] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/puppetlabs/puppet/ssl/certs] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppetlabs/puppet/ssl] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state/state.yaml]: Autorequiring File[/var/opt/lib/pe-puppet/state] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/client_yaml]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/client_data]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state/resources.txt]: Autorequiring File[/var/opt/lib/pe-puppet/state] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/clientbucket]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state/last_run_summary.yaml]: Autorequiring File[/var/opt/lib/pe-puppet/state] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state/last_run_report.yaml]: Autorequiring File[/var/opt/lib/pe-puppet/state] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/state/graphs]: Autorequiring File[/var/opt/lib/pe-puppet/state] [0m
 [0;36mDebug: /File[/var/opt/lib/pe-puppet/facts.d]: Autorequiring File[/var/opt/lib/pe-puppet] [0m
 [0;36mDebug: /File[/etc/puppetlabs/puppet/environments/production]: Autorequiring File[/etc/puppetlabs/puppet] [0m
 [0;36mDebug: Finishing transaction 90461300 [0m
 [0;36mDebug: Loaded state in 0.15 seconds [0m
 [0;36mDebug: Loaded state in 0.18 seconds [0m
 [0;36mDebug: /Stage[main]/Sshd/Package[openssh-server]/before: requires File[/etc/ssh/sshd_config] [0m
 [0;36mDebug: /Stage[main]/Sshd/Service[sshd]/subscribe: subscribes to File[/etc/ssh/sshd_config] [0m
 [0;32mInfo: Applying configuration version '1433253677' [0m
 [0;36mDebug: Prefetching yum resources for package [0m
 [0;36mDebug: Executing '/bin/rpm --version' [0m
 [0;36mDebug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'' [0m
 [0;32mInfo: mount[pe_modules]: allowing * access [0m
 [0;36mDebug: Executing '/sbin/service sshd status' [0m
 [0;36mDebug: Executing '/sbin/chkconfig sshd' [0m
 [0;36mDebug: Finishing transaction 90055050 [0m
 [0;36mDebug: Storing state [0m
 [0;36mDebug: Stored state in 0.16 seconds [0m
 [mNotice: Finished catalog run in 0.66 seconds [0m
 [0;36mDebug: Using settings: adding file resource 'rrddir': 'File[/var/opt/lib/pe-puppet/rrd]{:path=>"/var/opt/lib/pe-puppet/rrd", :mode=>"750", :owner=>"pe-puppet", :group=>"pe-puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' [0m
 [0;36mDebug: Finishing transaction 90036300 [0m
 [0;36mDebug: Received report to process from learning.puppetlabs.vm [0m
 [0;36mDebug: Processing report from learning.puppetlabs.vm with processor Puppet::Reports::Store [0m

When I add in the notify commands after each hash, I get the notifications as expected, but still same result as in my original post.

Thanks
LA

Dan White

unread,
Jun 4, 2015, 1:26:17 PM6/4/15
to puppet...@googlegroups.com
OK.
Here are the significant bits:

Debug: importing '/etc/puppetlabs/puppet/environments/production/modules/sshd/manifests/init.pp' in environment production

Debug: Automatically imported sshd from sshd into production


Debug: /Stage[main]/Sshd/Package[openssh-server]/before: requires File[/etc/ssh/sshd_config]

Debug: /Stage[main]/Sshd/Service[sshd]/subscribe: subscribes to File[/etc/ssh/sshd_config]


Debug: Executing '/sbin/service sshd status'

Debug: Executing '/sbin/chkconfig sshd'

Debug: Finishing transaction 90055050

Debug: Storing state


I see nothing wrong.
Based on that output, I would say that :
Service sshd is already running
Package openssh-server is already installed
File /etc/ssh/sshd_config is identical to puppet:///modules/sshd/sshd_config
Change any or all of those states and run Puppet again.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”  (Bill Waterson: Calvin & Hobbes)

Luke Anderson

unread,
Jun 5, 2015, 4:58:29 AM6/5/15
to puppet...@googlegroups.com
Yes that was the case originally. To test again I uninstalled openssh-server and ensured that /etc/ssh/sshd_config file was removed, then ran puppet again. All worked as expected, package was installed, /etc/ssh/sshd file created and service running, however the quest tasks was not marked as completed, still stays at 5/6.

Unless this is a bug in the learning VM... as it is the very last quest & task.

As all is working as expected, and you have kindly validated my puppet code i'm happy with what I have learned.

Thank you for helping me! Also, thanks to Edouard for replying!

LA
Reply all
Reply to author
Forward
0 new messages