Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ansible
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
5e02438d
Commit
5e02438d
authored
Apr 18, 2019
by
julian.gethmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add autoupdate
parent
74720583
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
1 deletion
+110
-1
roles/common/files/automatic.conf
roles/common/files/automatic.conf
+81
-0
roles/common/handlers/main.yml
roles/common/handlers/main.yml
+7
-0
roles/common/tasks/sysupdate.yml
roles/common/tasks/sysupdate.yml
+22
-1
No files found.
roles/common/files/automatic.conf
0 → 100644
View file @
5e02438d
[
commands
]
# What kind of upgrade to perform:
# default = all available upgrades
# security = only the security upgrades
upgrade_type
=
security
random_sleep
=
0
# To just receive updates use dnf-automatic-notifyonly.timer
# Whether updates should be downloaded when they are available, by
# dnf-automatic.timer. notifyonly.timer, download.timer and
# install.timer override this setting.
download_updates
=
yes
# Whether updates should be applied when they are available, by
# dnf-automatic.timer. notifyonly.timer, download.timer and
# install.timer override this 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 includes command_email, then messages will be send via a shell
# command compatible with sendmail.
# Default is email,stdio.
# If emit_via is None or left blank, no messages will be sent.
emit_via
=
stdio
,
motd
[
email
]
# The address to send email messages from.
email_from
=
root
@
localhost
# List of addresses to send messages to.
email_to
=
root
# Name of the host to connect to to send email messages.
email_host
=
localhost
[
command
]
# The shell command to execute. This is a Python format string, as used in
# str.format(). The format function will pass a shell-quoted argument called
# `body`.
# command_format = "cat"
# The contents of stdin to pass to the command. It is a format string with the
# same arguments as `command_format`.
# stdin_format = "{body}"
[
command_email
]
# The shell command to use to send email. This is a Python format string,
# as used in str.format(). The format function will pass shell-quoted arguments
# called body, subject, email_from, email_to.
# command_format = "mail -s {subject} -r {email_from} {email_to}"
# The contents of stdin to pass to the command. It is a format string with the
# same arguments as `command_format`.
# stdin_format = "{body}"
# The address to send email messages from.
email_from
=
root
@
localhost
# List of addresses to send messages to.
email_to
=
root
[
base
]
# This section overrides dnf.conf
# Use this to filter DNF core messages
debuglevel
=
1
roles/common/handlers/main.yml
View file @
5e02438d
...
...
@@ -78,3 +78,10 @@
service
:
name
:
smartd
state
:
restarted
-
name
:
enable automatic
become
:
yes
service
:
name
:
dnf-automatic.timer
state
:
started
enabled
:
yes
roles/common/tasks/sysupdate.yml
View file @
5e02438d
---
-
name
:
Updating the system
become
:
yes
package
:
name=* state=latest
package
:
name
:
"
*"
state
:
latest
tags
:
-
skip_ansible_lint
when
:
ansible_distribution != "Ubuntu"
-
name
:
install autoupdate for Fedora
become
:
yes
package
:
name
:
"
dnf-automatic"
state
:
installed
when
:
ansible_distribution == "Fedora"
-
name
:
configure autoupdate
become
:
yes
copy
:
src
:
automatic.conf
dest
:
/etc/dnf/automatic.conf
mode
:
644
owner
:
root
group
:
root
when
:
ansible_distribution == "Fedora"
notify
:
-
enable automatic
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment