ESGF / esgf-ansible

A repository to hold Ansible inventory, playbooks, roles and tasks that specify the details of ESGF Node deployments.
3 stars 10 forks source link

Restart playbook #122

Closed sashakames closed 5 years ago

sashakames commented 5 years ago

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?

nathanlcarlson commented 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.

nathanlcarlson commented 5 years ago

Going to close this because I believe the above is an adequate solution.