solar/docs/spec/how_to_do_primary.md
Dmitry Shulyak 75bb0a1690 Add notes how to handle primary/non-primary resources
And improve simple ansible example
2015-04-06 13:21:23 -07:00

580 B

How to approach primary, non-primary resource mangement?

It should be possible to avoid storing primary/non-primary flag for any particular resource.

In ansible there is a way to execute particular task from playbook only once and on concrete host.

:: - hosts: [mariadb] tasks: - debug: msg="Installing first node" run_once: true delegate_to: groups['mariadb'][0] - debug: msg="Installing all other mariadb nodes" when: inventory_hostname != groups['mariadb'][0]