samdoran.yum_cron

yum-cron

Galaxy

This tool installs and sets up yum-cron or dnf-automatic to automatically apply updates on RHEL.

Requirements

None

Role Variables

The setup options differ for RHEL 6 and RHEL 7. For RHEL 7 and 8, the options are mostly similar.

In RHEL 7, there are configuration files for daily and hourly updates. You can use the same settings for both or set different values for daily and hourly in the variable. Check defaults/main.yml for examples.

Keep in mind that not all options can be set separately. Some options need to have different values for daily and hourly, marked with a *.

Also, when using values like true or false, make sure to use quotes so they are treated as strings. The config files expect true and false, not True and False.

RHEL 7/8 Variables

Name Default Value Description
yumcron_update_cmd default Type of update to run. *
yumcron_update_messages {daily: 'yes', hourly: 'no'} Should messages be sent when updates are available? *
yumcron_download_updates {daily: 'yes', hourly: 'no'} Download updates if available? *
yumcron_apply_updates false Install updates if available?
yumcron_random_sleep {daily: 360, hourly: 15} Max random wait time in minutes.
yumcron_system_name None Name used in messages. *
yumcron_emit_via stdio Method to send messages (stdio or email).
yumcron_output_width 80 Character width of messages.
yumcron_email_from root@localhost Email address to send messages from.
yumcron_email_to ['root'] List of email addresses to send messages to.
yumcron_email_host localhost Host to connect to for sending emails.
yumcron_group_list None List of groups to update.
yumcron_group_package_types ['mandatory', 'default'] Types of group packages to install.
yumcron_debuglevel 0 Filter yum messages.
yumcron_skip_broken [undefined]
yumcron_mdpolicy group:main
yumcron_assumeyes [undefined] Automatically import new gpg keys (risky).
yumcron_command_format cat
yumcron_stdin_format {body}

RHEL 6 Variables

Name Default Value Description
yumcron_yum_parameter ''
yumcron_check_only 'no' Run just check-update, do not download or install.
yumcron_check_first 'no' Check if repos are reachable before doing anything.
yumcron_download_only 'no' Download updates only, do not install.
yumcron_error_level 0 Passed to --errorlevel yum option.
yumcron_debug_level 0 Passed to --debuglevel yum option.
yumcron_randomwait 60 Passed to --randomwait yum option.
yumcron_mailto '' Address to send messages to.
yumcron_systemname '' System name used in messages.
yumcron_days_of_week '0123456' Days of the week to run the updates.
yumcron_cleanday '0' Day to clear yum cache.
yumcron_service_waits 'yes' Wait for service completion before shutdown.
yumcron_service_wait_time 300 Max wait time in seconds for service.

Dependencies

None

Example Playbook

    - hosts: all

      vars:
        yumcron_apply_updates:
          daily: 'yes'
          hourly: 'no'

      roles:
         - samdoran.yum-cron

License

Apache 2.0

Informazioni sul progetto

Configure automatic yum/dnf updates

Installa
ansible-galaxy install samdoran.yum_cron
Licenza
Unknown
Download
6.8k
Proprietario
Former Ansible Core Maintainer. Pythonista.