Ask Your Question
0

how to restart the server (like weblogic , tomacat )by puppet ?

asked 2016-06-27 20:10:05 -0500

arjun gravatar image

How to restart the server (like weblogic , tomacat )by puppet script?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-07-02 16:40:25 -0500

Emerson Prado gravatar image

updated 2016-07-02 23:45:17 -0500

DarylW gravatar image

Notify the service:

service { 'service_that_should_be_restarted':  
  ...  
}  

resource_that_will_trigger_service_restart { 'name':  
  ...  
  notify => Service['service_that_should_be_restarted'],  
}

Alternatively, you can have the service subscribed to another resource:

service { 'service_that_should_be_restarted':  
  ...  
  subscribe => Resource_that_will_trigger_service_restart['name'],  
}  

resource_that_will_trigger_service_restart { 'name':  
  ...  
}

Pls check:
https://docs.puppet.com/puppet/4.5/re...
https://docs.puppet.com/puppet/4.5/re...
https://docs.puppet.com/puppet/4.5/re...

edit flag offensive delete link more
0

answered 2016-07-01 16:02:56 -0500

Nizen gravatar image

When do you want it to restart? If it's any time puppet is run, you can run another command like the one in your previous post:

exec { 'restart-command':
  command => 'service tomcat restart',
  path => '/usr/bin/service',
}
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: 2016-06-27 20:10:05 -0500

Seen: 57 times

Last updated: Jul 02 '16