1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 23:12:32 +01:00

toolbox buster upgrade role

This commit is contained in:
eoli3n 2019-12-02 14:31:23 +01:00
parent fdf3ee5def
commit bbbb0f0542
4 changed files with 43 additions and 0 deletions

@ -27,6 +27,13 @@
msg: "Don't run as root." msg: "Don't run as root."
when: ansible_user_id == "root" when: ansible_user_id == "root"
- hosts: server:desktop:laptop
tasks:
- name: update package list if apt
apt:
update_cache: yes
when: ansible_distribution == "Debian"
- hosts: server:desktop:laptop - hosts: server:desktop:laptop
roles: roles:
- { role: packages-common, tags: packages-common } - { role: packages-common, tags: packages-common }

@ -0,0 +1,9 @@
deb http://ftp.fr.debian.org/debian/ buster main
deb-src http://ftp.fr.debian.org/debian/ buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
# buster-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ buster-updates main
deb-src http://ftp.fr.debian.org/debian/ buster-updates main

@ -0,0 +1,23 @@
---
- name: Gather facts
gather_facts:
- name: Upgrade to Debian 10
block:
- name: Install https source support
apt:
name:
- apt-transport-https
- ca-certificates
- name: Define apt sources to buster
copy:
src: sources.list
dest: /etc/apt/
- name: Apt update and upgrade
apt:
update_cache: yes
upgrade: yes
- name: Apt dist upgrade
apt:
upgrade: dist
when: ansible_distribution_release == 'stretch'

4
toolbox/README Normal file

@ -0,0 +1,4 @@
# upgrade to debian buster
```
ansible <target> -m include_role -a 'name=buster_upgrade'
```