guidugli.auto_update

Ansible Role: auto_update

This Ansible Role helps install and set up packages for automatic updates on RHEL/CentOS, Fedora, and Debian/Ubuntu systems.

Requirements

No prerequisites are needed.

Role Variables

Here are the available variables with their default values (check defaults/main.yml):

  • au_enable_auto_update: yes
    This setting enables the system to automatically update packages. If set to "no", it will turn off the service (if it's installed) or do nothing if it's not installed.

  • au_security_only: yes
    If this is "yes", only security updates will be installed.

  • au_email_from: root
    Email origin address.

  • #au_email_to: admin@someorg.local
    This is the email address for the recipient.

  • au_download_only: no
    If "yes", it will just download updates without installing them. If "no", it will download and install updates.

  • #au_emit_via: stdio
    Method to send notifications. Options include stdio, email, and motd.

  • #au_command_format: "mail -s {subject} -r {email_from} {email_to}"
    Shell command format to send emails. Uses Python formatting for body, subject, email_from, and email_to.

  • #au_stdin_format: "{body}"
    Defines the standard input content for the command using the same arguments as command_format.

  • #au_email_server: localhost
    Hostname or IP address of the email server.

  • #au_system_name: mysystem
    Name to identify this system in messages; defaults to the hostname.

  • #au_mail_report: only-on-error
    Set to "always", "only-on-error", or "on-change" to control when reports are sent.

  • #au_remove_old_kernel: yes
    Automatically remove unused kernel-related packages (like kernel images and headers).

  • au_remove_new_unused_dependencies: yes
    Automatically remove newly unused dependencies after the upgrade.

  • au_remove_unused_dependencies: no
    Automatically remove unused packages after the upgrade (similar to apt-get autoremove).

  • #au_automatic_reboot: no
    Automatically reboot the system without confirmation if /var/run/reboot-required is found after the upgrade.

  • #au_reboot_with_users: yes
    Automatically reboot the system even if users are logged in when the upgrade requests it.

  • #au_reboot_time: '02:00'
    If reboot is needed, it can be scheduled for a specific time instead of immediate; default is "now".

  • #au_syslog_enable: no
    Enables logging to syslog; default is False.

  • #au_syslog_facility: daemon
    Specifies the syslog facility; default is daemon.

Dependencies

There are no dependencies.

Example Playbook

- hosts: servers
  roles:
     - { role: guidugli.auto_update }

License

MIT / BSD

Author Information

This role was created in 2020 by Carlos Guidugli.

Informazioni sul progetto

Install and configure packages to auto update linux

Installa
ansible-galaxy install guidugli.auto_update
Licenza
mit
Download
120
Proprietario