On Fri, 01 May 2015 05:19 -0700, Serega Sheypak <[email protected]> wrote: > Hi, I'm trying to pick correct roles layout and can't find solution. > The task is to install spark. > There are three roles: > > -install-spark-base (install spark-core package) > -install-spark-configuration (puts configuration shared by all spark > services) > -install-spark-service-XXX (where XXX master, worker, history, jobserver) > (installs concrete spark service) > > - hosts: sparkworkers > user: "{{ sudoUser }}" > sudo: True > roles: > - install-spark-worker > > install-spark-worker depends on install-spark-configuration > install-spark-configuration depends on install-spark-base > > So when install-spark-worker role is played, ansible runs > -install-spark-base > then > -install-spark-configuration > then > -install-spark-worker
I'd just have: spark (install packages, shared configuration, etc) spark-master (specific packages, files, etc) spark-worker spark-jobserver .... > > Looks nice, basement, configuration and concrete service are separated. > BUT > I want install-spark-configuration to restart services each time > configuration changes. When I do first run install-spark-configuration > tries to restart absent service, since concrete service is installed > AFTER > configuration. > What is the right way to resolve such collision? I don't know how Spark works but there must be a way to trigger a complete restart of all the services involved. The basic "spark" role could have a task for that. And each "spark-$service" role would take care of restarting only the service impacted. Giovanni -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1430484926.883905.261434553.5EE4A0DE%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
