Ask Your Question

puppet mount with service

asked 2013-11-21 01:58:32 -0600

rakkaus gravatar image

Hi guys! can you help me with relationships in puppet?

I have some service that depend on mounted dir so I need launch service ONLY_IF the dir will be mounted successfully.

I belive that puppet can manage this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-25 07:37:08 -0600

rjc gravatar image

updated 2013-11-25 14:13:06 -0600

Stefan gravatar image

If you're managing your mount using puppet, then it should be as simple as:

mount { '/mount/point':
  ensure => mounted,

service { 'service':
  require => Mount['/mount/point']



edit flag offensive delete link more


Thank you! but what if mount will not success? I need to be 100% sure that my `service` that depend on mount will be skipped when `mount` will be failed ...(more)

rakkaus gravatar imagerakkaus ( 2013-11-25 08:12:18 -0600 )edit

That's why I have used 'ensure => mounted' in my example - it'll take care of that. Your service will fail with: Dependency Mount[/moun/point] has failures: true (/Stage ...(more)

rjc gravatar imagerjc ( 2013-11-25 08:53:01 -0600 )edit

aha! I got it! thank you!

rakkaus gravatar imagerakkaus ( 2013-11-25 09:09:41 -0600 )edit

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


Asked: 2013-11-21 01:58:32 -0600

Seen: 93 times

Last updated: Nov 25 '13