Puppet classes out of order despite explicit arrow operator use

Posted by Alexandr Kurilin on Server Fault See other posts from Server Fault or by Alexandr Kurilin
Published on 2013-07-03T03:39:57Z Indexed on 2013/07/03 5:07 UTC
Read the original article Hit count: 555

Filed under:

Absolute puppet beginner here. I'm experiencing an interesting behavior with my puppet manifests and would love to know what I'm doing wrong. Let's for example say I'm configuring the instance with the following ordered classes:

class { 'update_system': } ->
class { 'facter': } ->
class { 'user_sshkey': user => 'ubuntu', type => 'rsa', } ->
class { 'tmux': user => 'ubuntu', } ->
class { 'vim': user => 'ubuntu', } ->
class { 'bashrc': user => 'ubuntu' } ->
notify {"Configuring DB role":} ->
class { 'postgresql': }

when I run the manifest with the --debug switch, by looking at notify statements I can see the classes be executed in the following order:

1. update_system starts
2. a cron type inside of postgresql class (the very **last** class in that ordered list above) is executed
3. postgres::install starts
5. facter starts installing
6. postgres::configure and postgres::service start
7. the vim class is executed
8. "Configuring DB role" notification is made. All the way at the end here.
etc

Basically the thing is all over the place, the order doesn't seem to follow the arrow operators in any way.

I'm guessing I'm missing something here that would force the classes to execute one at a time. Could it be that I'm missing some kind of anchor pattern here? Invalid containment?

© Server Fault or respective owner

Related posts about puppet