Closed cweagans closed 8 years ago
I would add a post_task: section in your playbook to do that.
Yeah, I know I could do it myself. I'm just pointing out that if you're gonna have to do it anyway, might as well have the role do it automatically.
The only reason I don't do that automatically is because I usually do things like networking and/or SSH configuration in the same playbooks, and rebooting can do fun things like make the Pi suddenly inaccessible (irrevocably until you log in via console/keyboard) if you configure things wrong.
Restarting services is something I'd do without a second thought—but restarting servers should be much more intentional, imo, and not something any random role does. It should be done as part of the playbook, or manually.
If most of the changes that can be made with this role requires a reboot to take effect, does it make sense to just automatically reboot the Pi and wait for it to come back online before continuing?