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
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?
--
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/afcecd79-7c04-49d0-8026-fa1905b3f3d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.