systemli.needrestart

ansible-role-needrestart

Estado de construcción Ansible Galaxy

Rol para instalar y mantener needrestart

Variables del Rol

Valores predeterminados:

# Los administradores deben ser informados por correo electrónico
needrestart_notifyd_disable_email: 0

# Todas las demás notificaciones deben ser desactivadas
needrestart_notifyd_disable_write_tty: 1
needrestart_notifyd_disable_needrestart_session: 1
needrestart_notifyd_disable_notify_send: 1

# Reiniciar servicios (l)ista solo, (i)nteractivo o (a)utomáticamente.
needrestart_action: l

# Correo electrónico que será notificado
needrestart_mail_address: $NR_USERNAME

# Servicios que deben ser ignorados
needrestart_ignorelist: []

# Servicios en la lista negra como regex
# Ejemplo:
# needrestart_blacklist_rc:
#   - cron\.service
needrestart_blacklist_rc: []

# Binarios en la lista negra como regex
# Ejemplo:
# needrestart_blacklist_bin:
#   - /opt/.*/java
needrestart_blacklist_bin: []

# Scripts personalizados de needrestart
# Ejemplo:
# needrestart_restartd:
#   - name: unbound
#     script: "systemctl restart unbound.service"
needrestart_restartd: []

Descarga

Descarga la última versión con ansible-galaxy

ansible-galaxy install systemli.needrestart

Ejemplo de Playbook

- hosts: servidores
  roles:
     - { role: systemli.needrestart }

Ejemplo de Variables Extendidas

# Los administradores deben ser informados por correo electrónico
needrestart_disable_email: 0 

## Reiniciar servicios (l)ista solo, (i)nteractivo o (a)utomáticamente. 
needrestart_action: a

# Correo electrónico que será notificado cuando un servicio deba reiniciarse 
needrestart_mail_address: [email protected]

# Ignorar servicios a continuación durante el reinicio automático
needrestart_ignorelist:
  grupo:
     - nombre_servicio
  Bases_de_datos:
     - mysql
     - mongodb
  Correo:
     - exim4
     - dovecot
  Servidores_Web:
     - apache2

Pruebas y Desarrollo

Pruebas

Se utiliza Molecule, Docker y Github Actions para pruebas continuas. En el entorno local, puedes probar fácilmente el rol con

molecule test 

Esto requiere que Molecule, Vagrant y python-vagrant estén instalados.

Licencia

GPLv3

Información del Autor

https://www.systemli.org

Acerca del proyecto

Install and maintain needrestart software, to check which daemons need to be restarted after library upgrades. Contains tests for Molecule.

Instalar
ansible-galaxy install systemli.needrestart
Licencia
gpl-3.0
Descargas
11.4k
Propietario
Your friendly tech collective