Create a dnf-automatic role, and switch taskotron/resultsdb dev to use it.

This commit is contained in:
Kevin Fenzi 2015-12-08 18:38:40 +00:00
parent ca6d1ac012
commit dc6f14bd31
5 changed files with 80 additions and 3 deletions

View file

@ -22,7 +22,7 @@
- { role: hosts, tags: ['hosts']}
- { role: fas_client, tags: ['fas_client'] }
- { role: collectd/base, tags: ['collectd_base'] }
- { role: yum-cron, tags: ['yumcron'] }
- { role: dnf-automatic, tags: ['dnfautomatic'] }
- { role: sudo, tags: ['sudo'] }
- apache

View file

@ -22,7 +22,7 @@
- { role: hosts, tags: ['hosts']}
- { role: fas_client, tags: ['fas_client'] }
- { role: collectd/base, tags: ['collectd_base'] }
- { role: yum-cron, tags: ['yumcron'] }
- { role: dnf-automatic, tags: ['dnfautomatic'] }
- { role: sudo, tags: ['sudo'] }
tasks:

View file

@ -22,7 +22,7 @@
- { role: hosts, tags: ['hosts']}
- { role: fas_client, tags: ['fas_client'] }
- { role: collectd/base, tags: ['collectd_base'] }
- { role: yum-cron, tags: ['yumcron'] }
- { role: dnf-automatic, tags: ['dnfautomatic'] }
- { role: sudo, tags: ['sudo'] }
- apache

View file

@ -0,0 +1,25 @@
---
#
# This role adds dnf automatic package and configuration.
# We want this on any public facing Fedora installs so we
# can pick up security updates.
#
- name: install dnf-automatic
yum: name=dnf-automatic state=present
tags:
- packages
when: ansible_distribution == 'Fedora'
- name: install /etc/dnf/automatic.conf
template: src=automatic.conf.j2 dest=/etc/dnf/automatic.conf mode=0644
tags:
- config
when: ansible_distribution == 'Fedora'
- name: enable and start dnf-automatic
command: systemctl enable dnf-automatic.timer --now creates=/etc/systemd/system/basic.target.wants/dnf-automatic.timer
tags:
- config
when: ansible_distribution == 'Fedora'

View file

@ -0,0 +1,52 @@
[commands]
# What kind of upgrade to perform:
# default = all available upgrades
# security = only the security upgrades
upgrade_type = security
random_sleep = 300
# Whether updates should be downloaded when they are available.
download_updates = yes
# Whether updates should be applied when they are available.
# Note that if this is set to no, downloaded packages will be left in the
# cache regardless of the keepcache setting.
apply_updates = yes
[emitters]
# Name to use for this system in messages that are emitted. Default is the
# hostname.
# system_name = my-host
# How to send messages. Valid options are stdio, email and motd. 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 includes motd, /etc/motd file will have the messages.
# If emit_via is None or left blank, no messages will be sent.
# Default is email,stdio.
emit_via = email
# The width, in characters, that messages that are emitted should be
# formatted to.
output_width = 80
[email]
# The address to send email messages from.
email_from = root
# List of addresses to send messages to.
email_to = root
# Name of the host to connect to to send email messages.
email_host = localhost
[base]
# This section overrides dnf.conf
# Use this to filter DNF core messages
debuglevel = 1