Commit 0d64cc01 authored by Jan-Oliver Opdenhövel's avatar Jan-Oliver Opdenhövel
Browse files

Moving the package upgrade into the playbook

parent f8b08898
......@@ -28,20 +28,24 @@
- zsh
- tmux
- role: system-upgrade
- role: periodical-reboot
- role: ansible-pull
ansible_pull:
url: https://git.cs.uni-paderborn.de/rbfsmi/rbfsmi-ansible.git
branch: target/fsmi-matrix
post_tasks:
- name: configure per-host kernel settings
sysctl:
name: "{{ item.key }}"
value: "{{ item.value }}"
loop: "{{ hostvars[inventory_hostname].sysctl|default({})|dict2items }}"
- name: upgrade packages
command:
cmd: pacman -Syu --noconfirm
register: upgrade
- debug: var=upgrade.stdout_lines
- name: configure basic server
hosts: server
......
system_upgrade:
timer: |
OnBootSec=5m
OnCalendar=daily
RandomizedDelaySec=30m
---
- name: install system upgrade units
template:
dest: /etc/systemd/system
src: "{{ item }}"
loop:
- system-upgrade.service
- system-upgrade.timer
- name: enable system upgrade timer
service:
name: system-upgrade.timer
state: started
enabled: yes
{{ ansible_managed|comment }}
[Unit]
Description=system package upgrade
After=network-online.target
[Service]
ExecStart=/usr/bin/pacman -Syu --noconfirm
TimeoutStopSec=180
{{ ansible_managed|comment }}
[Unit]
Description=regular system upgrade
[Timer]
{{ system_upgrade.timer }}
Unit=system-upgrade.service
Persistent=true
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment