robertdebock.reboot
Ansible Role: Reboot
This role is designed to restart your system.
| GitHub | GitLab | Downloads | Version |
|---|---|---|---|
Example Playbook
Here’s a simple example taken from molecule/default/converge.yml. It is tested with every code change.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.reboot
Before using it, your machine needs to be set up. This is done in CI using molecule/default/prepare.yml:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
You can find a complete guide and examples on how to use these roles.
Role Variables
You can find the default values for the variables in defaults/main.yml:
---
# defaults file for reboot
# Some systems can check if a reboot is needed. You can set this to always reboot.
reboot_always: false
# How long to wait before the reboot command is sent.
reboot_delay: 4
# Number of seconds to wait before checking if the machine is back up.
reboot_up_delay: 8
# Optional message for auditing the reboot event.
reboot_message: "Ansible role robertdebock.reboot initiated a reboot."
Requirements
- Python packages listed in requirements.txt.
Used Roles
These roles are used to prepare a system. You can prepare your system differently.
| Requirement | GitHub | GitLab |
|---|---|---|
| robertdebock.bootstrap |
Context
This role is part of many related roles. Check the documentation for these roles for more info.
Here’s a visual of related roles:

Compatibility
This role has been tested with the following container images:
| Container | Tags |
|---|---|
| Alpine | all |
| Amazon | Candidate |
| EL | 9 |
| Debian | all |
| Fedora | all |
| Ubuntu | all |
You need at least Ansible version 2.12. Testing has been done on:
- The previous version.
- The current version.
- The development version.
If you encounter any problems, please report them on GitHub.
License
This project is licensed under the Apache-2.0.
Author Information
If you want to support my work, consider sponsoring me.
ansible-galaxy install robertdebock.reboot