robertdebock.reboot

Ansible Role: Reboot

This role is designed to restart your system.

GitHub GitLab Downloads Version
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

Used Roles

These roles are used to prepare a system. You can prepare your system differently.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

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: dependencies

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

robertdebock

If you want to support my work, consider sponsoring me.

Informazioni sul progetto

The purpose of this role is to reboot your system.

Installa
ansible-galaxy install robertdebock.reboot
Licenza
apache-2.0
Download
160.3k
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.