https://github.com/giovtorres/ansible-role-yum-cron
Ansible Role - yum-cron
https://github.com/giovtorres/ansible-role-yum-cron
ansible cron packages role updates yum yum-cron
Last synced: about 1 month ago
JSON representation
Ansible Role - yum-cron
- Host: GitHub
- URL: https://github.com/giovtorres/ansible-role-yum-cron
- Owner: giovtorres
- Created: 2017-07-25T00:11:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T20:18:18.000Z (over 5 years ago)
- Last Synced: 2025-05-01T21:32:51.509Z (6 months ago)
- Topics: ansible, cron, packages, role, updates, yum, yum-cron
- Language: Python
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible Role: yum-cron
[](https://travis-ci.org/giovtorres/ansible-role-yum-cron)
[](https://galaxy.ansible.com/giovtorres/yum-cron/)Installs and configures yum-cron which runs yum updates as a cron job.
Supported on EL6 and 7.## Requirements
None.
## Role Variables
> Note: The configuration for yum-cron differs between EL6 and 7. Therefore, a
> different group of variables are used depending on your distribution version.### EL 7 Options
Enable or disable the yum-cron service:
```yaml
yum_cron_service_enabled: True
```What kind of update to use. Options are:
- `default` = yum upgrade
- `security` = yum --security upgrade
- `security-severity:Critical` = yum --sec-severity=Critical upgrade
- `minimal` = yum --bugfix update-minimal
- `minimal-security` = yum --security update-minimal
- `minimal-security-severity:Critical` = yum --sec-severity=Critical update-minimal```yaml
yum_cron_update_cmd: "default"
```Whether a message should be emitted when updates are available, were
downloaded, or applied:```yaml
yum_cron_update_messages: "yes"
```Whether updates should be downloaded when they are available:
```yaml
yum_cron_download_updates: "yes"
```Whether updates should be applied when they are available. Note that
download_updates must also be yes for the update to be applied:```yaml
yum_cron_apply_updates: "yes"
```Maximum amout of time to randomly sleep, in minutes:
```yaml
yum_cron_random_sleep: 360
```Name to use for this system in messages that are emitted. If system_name is
None, the hostname will be used:```yaml
yum_cron_system_name: "None"
```How to send messages. Valid options are `stdio` and `email`. If emit_via includes
stdio, messages will be sent to stdout; this is useful to have cron send the
messages. If emit_via includes email, this program will send email itself
according to the configured options. If emit_via is None or left blank, no
messages will be sent.```yaml
yum_cron_emit_via: "stdio"
```The width, in characters, that messages that are emitted should be formatted to:
```yaml
yum_cron_output_width: 80
```The address to send email messages from. NOTE: 'localhost' will be replaced
with the value of system_name.```yaml
yum_cron_email_from: "root@localhost"
```List of addresses to send messages to:
```yaml
yum_cron_email_to: "root"
```Name of the host to connect to to send email messages:
```yaml
yum_cron_email_host: "localhost"
```Use this to filter Yum core messages:
- `-4`: critical
- `-3`: critical+errors
- `-2`: critical+errors+warnings (default)```yaml
yum_cron_debuglevel: "-2"
```### EL6 Options
Pass parameters to yum:
```yaml
yum_cron_yum_parameter: ""
```Don't install, just check:
```yaml
yum_cron_check_only: "no"
```Check to see if you can reach the repos before updating:
```yaml
yum_cron_check_first: "no"
```Don't install, just check and download:
```yaml
yum_cron_download_only: "no"
```Print error ranging from level 0 thru 10. 0 means print only critical errors:
```yaml
yum_cron_error_level: "0"
```Set the debug level from 0 thru 10, higher number means more output:
```yaml
yum_cron_debug_level: "0"
```Tell yum to wait a random time:
```yaml
yum_cron_randomwait: "60"
```Mail the output to this email address:
```yaml
yum_cron_mailto: ""
```Tag the yum emails when sent:
```yaml
yum_cron_systemname: "{{ ansible_fqdn }}"
```Days of the week you want to run yum-cron:
```yaml
yum_cron_days_of_week: "0123456"
```Do clean up on this day. Defaults to `0` (Sunday):
```yaml
yum_cron_cleanday: "0"
```Make yum-cron service wait for transactions to complete:
```yaml
yum_cron_service_waits: "yes"
```Set the time period, in seconds. for the yum-cron service to wait for
transactions to complete:```yaml
yum_cron_service_wait_time: "300"
```## Dependencies
None.
## Example Playbook
```yaml
- hosts: servers
roles:
- giovtorres.yum-cron
```## License
BSD.