Learning VM Resource Ordering Quest - Task 6/6
Hi,
I'm stuck with the final task number 6 on the 'Resource Ordering' quest of the Learning VM. The task requires the following to be completed:
"The sshd/manifests/init.pp manifest should should define the sshd class"
I have created my 'sshd/manifests/init.pp' manifest which looks like this;
class sshd {
package {'openssh-server':
ensure => present,
before => File['/etc/ssh/sshd_config'],
}
file {'/etc/ssh/sshd_config':
ensure => file,
mode => 600,
source => 'puppet:///modules/sshd/sshd_config',
}
service {'sshd':
ensure => running,
enable => true,
subscribe => File['/etc/ssh/sshd_config'],
}
}
My 'sshd/tests/init.pp' manifest looks like this:
include 'sshd'
Puppet parser tool returns no errors with syntax on either of my manifests, however when applying the manifest with either 'puppet apply' or 'puppet agent -t' nothing seems to happen and the task does not complete:
[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]#
Can anyone please help or point me in the right direction? As far as I can see, my manifest clearly defines my sshd class as required by the task.
Update:
Output of 'puppet apply sshd/tests/ini.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 ...
Could you provide the output of puppet apply sshd/tests/init.pp --debug ? Thanks
Hi, How do I attach it here? It's too long for a comment, and I can only use the Answer box once. Thanks
You can edit the original post and add it there.
Thanks :) just added it.
Can you confirm whether or not there is a file /etc/ssh/sshd_config already on your system?