Closed sashakames closed 5 years ago
I've pointed this out in the docs I believe, my current practice is the following:
$ ansible-playbook [ args ] stop.yml start.yml [ status.yml ]
This will queue up the two playbooks, stop.yml
and start.yml
, to run with one authentication prompt. Optionally tack on status.yml
to check if services came up correctly. Some services may take a moment to completely start up so running status.yml
a little later may be a good idea.
See #109 for info about service selection.
Going to close this because I believe the above is an adequate solution.
If I need to stop and start services, this needs to be issued in 2 commands. This is not great because (1) the stop may complete and leave the node offline for the time it takes me to notice, or I have to watch it for the period. (2) for remote Sudo I have to enter credentials twice. That would make calling both playbooks in a script impractical. Could the playbooks be wrapped into a single restart.yml, hopefully preserving order?