mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-22 15:01:59 +01:00
toolbox buster upgrade role
This commit is contained in:
parent
fdf3ee5def
commit
bbbb0f0542
@ -27,6 +27,13 @@
|
||||
msg: "Don't run as 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
|
||||
roles:
|
||||
- { role: packages-common, tags: packages-common }
|
||||
|
9
roles/buster_upgrade/files/sources.list
Normal file
9
roles/buster_upgrade/files/sources.list
Normal file
@ -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
|
23
roles/buster_upgrade/tasks/main.yml
Normal file
23
roles/buster_upgrade/tasks/main.yml
Normal file
@ -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
4
toolbox/README
Normal file
@ -0,0 +1,4 @@
|
||||
# upgrade to debian buster
|
||||
```
|
||||
ansible <target> -m include_role -a 'name=buster_upgrade'
|
||||
```
|
Loading…
Reference in New Issue
Block a user