I seem to be pointing someone to this every week. You may want to refer
to John Bollinger's 2014-01-03 reply to the "wondering if I want to[sic]
much now" thread, which gives some excellent descriptions on 'how not to
Puppet':
https://groups.google.com/d/msg/puppet-users/IGqjPpVCrKA/VcUKiV3xfPkJ
As Denmat said, "that's not how Puppet works." Puppet is not a bash
script, it's a declarative language to describe the desired
configuration of something. On resources that absolutely must have an
order dependency, you can use explicit ordering (->) or even better, the
require parameter. Aside from variable resolution, manifests aren't
executed in a defined order (you should really spend some time reading
through docs.puppetlabs.com, especially w/r/t catalog compilation and
evaluation).
-Jason
On 02/10/2014 03:19 AM, Muhammad Yousuf Khan wrote:
i am being through a exercise on docs.puppetlabs.com
<http://docs.puppetlabs.com>
and i am confuse with the notification output. as it shows last
message first and first message at last.
i just need to know why the output notifications are random
here is my .pp file.
@puppet:/etc/puppetlabs/puppet# cat text.pp
file {'/tmp/test1':
ensure => file,
content => "Hi.\n",
}
notify {"this is 1":}
file {'/tmp/test2':
ensure => directory,
mode => 0644,
}
file {'/tmp/test3':
ensure => link,
target => '/tmp/test1',
}
file {'/tmp/test2/insidedir':
ensure => file,
content => 'infor put by me',
}
user {'katie':
ensure => absent,
}
notify {"I'm notifying you.":}
notify {"this is 2":}
notify {"So am I!":}
notify {"this is 3":}
---------------------------------------
here is the output
Notice: Compiled catalog for puppet.mycompany.com
<http://puppet.mycompany.com> in environment production in 0.55 seconds
Notice: this is 2
Notice: /Stage[main]//Notify[this is 2]/message: defined 'message' as
'this is 2'
Notice: this is 3
Notice: /Stage[main]//Notify[this is 3]/message: defined 'message' as
'this is 3'
Notice: So am I!
Notice: /Stage[main]//Notify[So am I!]/message: defined 'message' as
'So am I!'
Notice: I'm notifying you.
Notice: /Stage[main]//Notify[I'm notifying you.]/message: defined
'message' as 'I'm notifying you.'
Notice: this is 1
Notice: /Stage[main]//Notify[this is 1]/message: defined 'message' as
'this is 1'
Notice: Finished catalog run in 0.49 seconds
so the question is why the notification outputs are so random.
Thanks,
MYK
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAGWVfMmp6tN_qHd1bRmrqp%2BoMi7QXARqDZf6KEWxnpGGLqUShQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/52F9137B.4030601%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.