Adding master VM for Rives and adapt radius role for bullseye
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
pz2891 2021-03-12 12:28:08 +01:00
parent bcc492339f
commit f6e1949c21
3 changed files with 51 additions and 5 deletions

2
hosts
View file

@ -358,7 +358,7 @@ prometheus-rives.adm.auro.re
dhcp-rives.adm.auro.re dhcp-rives.adm.auro.re
dns-rives.adm.auro.re dns-rives.adm.auro.re
radius-rives.adm.auro.re radius-rives.adm.auro.re
routeur-rives.auro.re routeur-rives.adm.auro.re
[rives_unifi] [rives_unifi]
r3-4-4.borne.auro.re r3-4-4.borne.auro.re

View file

@ -7,8 +7,7 @@
register: apt_result register: apt_result
retries: 3 retries: 3
until: apt_result is succeeded until: apt_result is succeeded
when: when: ansible_lsb.codename == 'buster' or ansible_lsb.codename == 'bullseye'
- ansible_lsb.codename == 'buster'
# Prometheus 2 node is in stretch-backports # Prometheus 2 node is in stretch-backports
- name: Install Prometheus node-exporter (stretch-backports) - name: Install Prometheus node-exporter (stretch-backports)

View file

@ -5,6 +5,17 @@
loop: loop:
- "deb" - "deb"
- "deb-src" - "deb-src"
when:
- ansible_lsb.codename == 'buster'
- name: Add backports repositories
apt_repository:
repo: "{{ item }} http://deb.debian.org/debian bullseye main contrib non-free"
loop:
- "deb"
- "deb-src"
when:
- ansible_lsb.codename == 'bullseye'
- name: Ensure /var/www exists - name: Ensure /var/www exists
file: file:
@ -34,7 +45,6 @@
- name: try to install freeradius-python3 (this will fail on post-install) - name: try to install freeradius-python3 (this will fail on post-install)
apt: apt:
name: freeradius-python3 name: freeradius-python3
default_release: buster-backports
update_cache: true update_cache: true
ignore_errors: true ignore_errors: true
@ -47,7 +57,6 @@
- name: reinstall broken package (this might fail too, for different reasons) - name: reinstall broken package (this might fail too, for different reasons)
apt: apt:
name: freeradius-python3 name: freeradius-python3
default_release: buster-backports
force: true force: true
ignore_errors: true ignore_errors: true
@ -108,6 +117,44 @@
shell: shell:
cmd: "cat apt_requirements_radius.txt | grep -v freeradius-python3 | xargs apt-get -y install" cmd: "cat apt_requirements_radius.txt | grep -v freeradius-python3 | xargs apt-get -y install"
chdir: /var/www/re2o/ chdir: /var/www/re2o/
when:
- ansible_lsb.codename == 'buster'
- name: Install radius requirements (except freeradius-python3) for bullseye
apt:
name:
- python3-django
- python3-dateutil
- texlive-latex-base
- texlive-fonts-recommended
- python3-djangorestframework
- python3-django-reversion
- python3-pip
- python3-pil
- libsasl2-dev
- libldap2-dev
- libssl-dev
- python3-pycryptodome
- python3-git
- javascript-common
- libjs-jquery
- libjs-jquery-ui
- libjs-jquery-timepicker
- libjs-bootstrap
- fonts-font-awesome
- graphviz
- git
- gettext
- libfreeradius3
- freeradius-utils
- freeradius
- freeradius-common
- freeradius-python3
- python3-dev
- python3-mysqldb
- python3-django-ldapdb
when:
- ansible_lsb.codename == 'bullseye'
- name: Install PyPi requirements for radius - name: Install PyPi requirements for radius
command: "pip3 install -r /var/www/re2o/pip_requirements.txt" command: "pip3 install -r /var/www/re2o/pip_requirements.txt"