1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00

Improving ETHZ Packages List

+ Cleanup
+ Improve ETHZ Packages List
+ Variables for ETHZ
This commit is contained in:
L3D 2023-07-31 17:26:22 +02:00
parent 5858fc9552
commit 28ec7b3293
Signed by: l3d
GPG key ID: CD08445BFF4313D1
7 changed files with 58 additions and 163 deletions

View file

@ -13,12 +13,15 @@ By default it will also add the [ETH Zürich Debian Packages Mirror](https://deb
| variable | default value | useage | | variable | default value | useage |
| --- | --- | --- | | --- | --- | --- |
| ``l3d_pkgs__adding_ethz`` | ``true`` | Adding the swiss ETH package mirror |
| ``l3d_pkgs__package_state`` | ``present`` | Package State, set to ``latest`` to upgrade packages managed by this role | | ``l3d_pkgs__package_state`` | ``present`` | Package State, set to ``latest`` to upgrade packages managed by this role |
| ``l3d_pkgs__install_advanced`` | ``false`` | Install some advanced packages like tcpdump, mtr, fio and ethertools. See ``vars/main.yml`` for details | | ``l3d_pkgs__install_advanced`` | ``false`` | Install some advanced packages like tcpdump, mtr, fio and ethertools. See ``vars/main.yml`` for details |
| ``l3d_pkgs__install_python`` | ``false`` | Install some Python packages like python3-pip. See ``vars/main.yml`` for details | | ``l3d_pkgs__install_python`` | ``false`` | Install some Python packages like python3-pip. See ``vars/main.yml`` for details |
| ``l3d_pkgs__install_cli`` | ``false`` | Install some CLI packages like htop, ranger and asciinema. See ``vars/main.yml`` for details | | ``l3d_pkgs__install_cli`` | ``false`` | Install some CLI packages like htop, ranger and asciinema. See ``vars/main.yml`` for details |
| ``l3d_pkgs__install_extra_packages`` | | List of additional packages to install | | ``l3d_pkgs__install_extra_packages`` | | List of additional packages to install |
| ``l3d_pkgs__adding_ethz`` | ``true`` | Adding the swiss ETH package mirror |
| ``l3d_pkgs__ethz_contrib`` | ``true`` | contrib packages contain DFSG-compliant software |
| ``l3d_pkgs__ethz_non_free`` | ``true`` | non-free contains software that does not comply with the DFSG. |
| ``l3d_pkgs__ethz_non_free_firmware`` | ``true`` | contains non-free-firmware packages |
| ``submodules_versioncheck`` | ``false`` | Enable simple versioncheck to prevent running old versions of this role | | ``submodules_versioncheck`` | ``false`` | Enable simple versioncheck to prevent running old versions of this role |
Contributing Contributing

View file

@ -1,6 +1,10 @@
--- ---
# Adding additional Package Server hosted by ETH Zürich # Adding additional Package Server hosted by ETH Zürich
l3d_pkgs__adding_ethz: true l3d_pkgs__adding_ethz: true
l3d_pkgs__ethz_contrib: true
l3d_pkgs__ethz_non_free: true
l3d_pkgs__ethz_non_free_firmware: true
# Methods for updating Packages # Methods for updating Packages
# set this to latest for updating packages managed by this role # set this to latest for updating packages managed by this role

View file

@ -1,24 +0,0 @@
---
- name: Vim is our editor
become: true
community.general.alternatives:
name: editor
path: /usr/bin/vim.basic
when:
- base__install_vim | bool
- ansible_distribution != 'CentOS'
- ansible_distribution != 'RedHat'
- ansible_distribution != 'Archlinux'
failed_when: false
- name: Vim is our editor
become: true
community.general.alternatives:
name: editor
path: /usr/bin/vim
when:
- base__install_vim | bool
- ansible_distribution == 'CentOS'
- ansible_distribution == 'RedHat'
- ansible_distribution == 'Archlinux'
failed_when: false

View file

@ -16,7 +16,7 @@
- apt-transport-https - apt-transport-https
state: present state: present
- name: Add eth zurich apt for Debian Bullaeye (11) and later - name: Add ETH zurich apt for Debian
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: "templates/apt.sources.list.j2" src: "templates/apt.sources.list.j2"
@ -25,18 +25,6 @@
group: root group: root
owner: root owner: root
notify: Run apt update notify: Run apt update
when: ansible_distribution_major_version > '10'
- name: Add eth zurich apt for Debian Buster (10) and earlyer
become: true
ansible.builtin.template:
src: "templates/apt.sources.list_legacy.j2"
dest: '/etc/apt/sources.list.d/debian_ethz_ch_debian.list'
mode: 0644
group: root
owner: root
notify: Run apt update
when: ansible_distribution_major_version < '11'
- name: Force all notified handlers to run at this point, not waiting for normal sync points - name: Force all notified handlers to run at this point, not waiting for normal sync points
ansible.builtin.meta: flush_handlers ansible.builtin.meta: flush_handlers

View file

@ -4,50 +4,58 @@
# HTTPS mirror: # HTTPS mirror:
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }} main deb https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n' -}} {{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }} main deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n\n' -}} {{- '\n\n' -}}
{%- if base__pkg_security | bool -%} {%- if base__pkg_security | bool -%}
# Inofficial Debian Security Mirror # Inofficial Debian Security Mirror
{% if ansible_distribution_major_version >= '11' -%}
deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security main deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security main
{%- if base__pkg_contrib | bool -%} {% else -%}
deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates main
{%- endif -%}
{%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n' -}} {{- '\n' -}}
{% if ansible_distribution_major_version >= '11' -%}
deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security main deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security main
{%- if base__pkg_contrib | bool -%} {% else -%}
deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates main
{%- endif -%}
{%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n\n' -}} {{- '\n\n' -}}
{%- endif -%} {%- endif -%}
@ -55,25 +63,25 @@ deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-secu
{%- if base__pkg_updates -%} {%- if base__pkg_updates -%}
# {{ ansible_distribution_release }}-updates, previously known as 'volatile' # {{ ansible_distribution_release }}-updates, previously known as 'volatile'
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n' -}} {{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n\n' -}} {{- '\n\n' -}}
{%- endif -%} {%- endif -%}
@ -81,25 +89,25 @@ deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates
{%- if base__pkg_backports -%} {%- if base__pkg_backports -%}
# {{ ansible_distribution_release }}-backports # {{ ansible_distribution_release }}-backports
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n' -}} {{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main
{%- if base__pkg_contrib | bool -%} {%- if l3d_pkgs__ethz_contrib | bool -%}
{{- ' contrib' -}} {{- ' contrib' -}}
{%- endif -%} {%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%} {%- if l3d_pkgs__ethz_non_free | bool -%}
{{- ' non-free' -}} {{- ' non-free' -}}
{%- if ansible_distribution_major_version >= '12' -%} {%- endif -%}
{{- ' non-free-firmware' -}} {%- if ansible_distribution_major_version >= '12' and l3d_pkgs__ethz_non_free_firmware | bool -%}
{%- endif -%} {{- ' non-free-firmware' -}}
{%- endif -%} {%- endif -%}
{{- '\n\n' -}} {{- '\n\n' -}}
{%- endif -%} {%- endif -%}

View file

@ -1,84 +0,0 @@
# Debian mirror der ETH Zürich
# https://debian.ethz.ch/
# HTTPS mirror:
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n\n' -}}
{%- if base__pkg_security | bool -%}
# Inofficial Security Mirror
deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n' -}}
deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n\n' -}}
{%- endif -%}
{%- if base__pkg_updates -%}
# {{ ansible_distribution_release }}-updates, previously known as 'volatile'
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-updates main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n\n' -}}
{%- endif -%}
{%- if base__pkg_backports -%}
# {{ ansible_distribution_release }}-backports
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n' -}}
deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }}-backports main
{%- if base__pkg_contrib | bool -%}
{{- ' contrib' -}}
{%- endif -%}
{%- if base__pkg_non_free_firmware | bool -%}
{{- ' non-free' -}}
{%- endif -%}
{{- '\n\n' -}}
{%- endif -%}
# Contact for proplems with the mirror:
# https://readme.phys.ethz.ch/services/contact/
# Or #isgphys on irc.phys.ethz.ch

View file

@ -50,5 +50,5 @@ l3d_pkgs__cli:
- bzip2 - bzip2
- jq - jq
playbook_version_number: 5 playbook_version_number: 6
playbook_version_path: 'l3d.base.packages.version' playbook_version_path: 'l3d.base.packages.version'