Skip to content

Commit

Permalink
update to vagrant box bookworm, made script bookworm-compliable
Browse files Browse the repository at this point in the history
  • Loading branch information
mirjan-hoffmann-tib committed Oct 12, 2023
1 parent e2b0d69 commit 832a0eb
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 11 deletions.
3 changes: 1 addition & 2 deletions SHIBBOLETH.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Es ist möglich den Single-Sign-On (SSO) Zugang via DFN-AAI (Shibboleth) automat
## Unterstützte Systeme
* Debian Stretch (9)
* Debian Buster (10)
* Debian
Ansible-Skripte für weitere Systeme können unter [ansible/roles/shibboleth/tasks](ansible/roles/shibboleth/tasks) hinzugefügt werden. Eine gute Beschreibung der Installation liefert [SWITCHaai](https://www.switch.ch/aai/guides/sp/installation/). Beiträge sind sehr willkommen - einfach einen Pull Request erstellen.
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ settings = YAML.load_file 'ansible/group_vars/all.yml'
Vagrant.configure("2") do |config|

config.vm.define "edu-sharing-vm" do |srv|
srv.vm.box = "debian/buster64"
srv.vm.box = "debian/bookworm64"
srv.ssh.insert_key = false
srv.vm.hostname = "edu-sharing.box"
srv.vm.network :private_network, ip: settings['edu_sharing_host']
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/apache/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Install apache
apt:
name: ["apache2"]
update_cache: true
state: "present"
tags:
- packages
Expand Down
1 change: 0 additions & 1 deletion ansible/roles/edu-sharing/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- unzip
- jq
- gzip
- python-lxml
- python3-lxml
become: yes
tags:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/moodle-registration/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
become: yes
vars:
packages:
- python-lxml
- python3-lxml
tags:
- packages
- root-task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Ensure python-lxml packages are present
apt:
name: ["python-lxml"]
name: ["python3-lxml"]
become: yes
tags:
- packages
Expand Down
14 changes: 14 additions & 0 deletions ansible/roles/shibboleth/tasks/debian-from-bullseye.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Debian Bullseye (11) +

- name: Check if SWITCHaai-swdistrib.list exists
stat:
path: /etc/apt/sources.list.d/SWITCHaai-swdistrib.list
register: switchaai_sources_list_stat_result

- include_tasks: migrate-from-switchaai.yml
when: switchaai_sources_list_stat_result.stat.exists

- name: Install shibboleth package for debian
apt:
update_cache: yes
name: libapache2-mod-shib
12 changes: 7 additions & 5 deletions ansible/roles/shibboleth/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

# Fail for unsupported versions
- fail: msg='unsupported OS version {{ ansible_distribution }} {{ ansible_distribution_release }}'
vars:
supported_versions:
- 'Debian stretch'
- 'Debian buster'
when: (ansible_distribution + ' ' + ansible_distribution_release) not in supported_versions
when: ansible_distribution != 'Debian'

- debug:
var: ansible_distribution_version

- include: debianstretch.yml
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'

- include: debianbuster.yml
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'buster'

- include: debian-from-bullseye.yml
when: ansible_distribution == 'Debian' and ansible_distribution_version is version('11', '>=')

- include: shibbolethconfig.yml
26 changes: 26 additions & 0 deletions ansible/roles/shibboleth/tasks/migrate-from-switchaai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

- name: Remove switchaai shibboleth
apt:
name: shibboleth
state: absent

- command:
cmd: apt-mark manual libapache2-mod-shib

- name: Remove switchaai-apt-source
apt:
name: switchaai-apt-source
purge: true
state: absent

- name: Remove switchaai files
file:
path: "{{ item }}"
state: absent
loop:
- /etc/apt/trusted.gpg.d/SWITCHaai-swdistrib.gpg
- /etc/apt/sources.list.d/SWITCHaai-swdistrib.list

- name: apt update
apt:
update_cache: true

0 comments on commit 832a0eb

Please sign in to comment.