Ask Your Question
0

Need Help with Puppet modules order of execution

asked 2015-11-19 05:41:57 -0500

kranthi gravatar image

Hi Team,

I had written few modules, 1st module will add Linux machines to domain, then user needs to login with his domain credentials and need to open Firefox to update his Firefox certificate store, 2nd module will sign and generate security certificates and 3rd module will install VPN client. I want the modules to be executed sequentially in the order mentioned above, 2nd module should run only once Domain credentials are authenticated and Firefox certificate store. Please help me and let me know how I can go about it.

Regards,

Kranthi

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-11-20 09:02:27 -0500

scoffland gravatar image

This does not sound like the puppet way of doing things but never less I'll help you bang your head on the wall by going down this dark alley.

If you must wait on some other task out side of puppet you will need multiple puppet runs.

1st run add 1st module.

Then user does foo.

2nd run perform module 2 exec with a before statement on module 3 but only if foo is done.

class module_one { do_something ]

class module_two {
  exec { 'do_something_else':
    command => "$title", 
    onlyif => "test do_something"
    before => File['do_yet_another_thing'],
  }
}

class module_three { 
  file { 'do_yet_another_thing':
    ensure => present,
  }
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-19 05:41:57 -0500

Seen: 114 times

Last updated: Nov 20 '15