geerlingguy / ansible-role-raspberry-pi

Configures a Raspberry Pi (running Raspbian).
https://galaxy.ansible.com/geerlingguy/raspberry-pi/
MIT License
107 stars 19 forks source link

Automatically reboot? #1

Closed cweagans closed 8 years ago

cweagans commented 8 years ago

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?

JakeDEvans commented 8 years ago

I would add a post_task: section in your playbook to do that.

cweagans commented 8 years ago

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.

geerlingguy commented 8 years ago

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.