Hi Guys,

Currently I'm coding a recipe for installing some UNIX daemon (openca,
but that's not very relevant).
This works fine, except some dependency stuff regarding classes from
an external module.

My current setup is like this:


/etc/puppet/modules/openca/manifests/init.pp:

class  openca {


    define openca-server($db_name, et cetera) {

       mysql::database{$db_name:
          ensure   => present
      }
      package{"openca":
           .....
      }

      service{"openca":
           .......
           requires => Package["openca"],
      }

    }
}

(yeah this example has been simplified a lot, I know puppet resolves
the depency all by it self in this case)

Very very simple, except for the fact that I want to add the
dependency for the mysql::database too. I'm using this excellent
module for managing mysql: https://github.com/camptocamp/puppet-mysql


Is there a neat way to do something like this

      service{"openca":
           .......
           requires => [Package["openca"],mysql::database["openca"]],
      }


I already tried doing this, and also tried dependency chaining, but
just can't get it to work at all.

Another option might be:


class openca
{


  define openca-database($db_name){


      mysql::database{$db_name:
          ensure   => present
      }
  }



    define openca-server($db_name , etc )  {

        openca::openca-database($db_name)

}



But that will not fix the dependency issue either.


Can someone please point either where to look for a clue (yeah in the
manual, but where?) or give me some advice regarding this?

Cheers,


Boudewijn Ector


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to