mirror of
https://github.com/roles-ansible/ansible_role_base.git
synced 2024-08-16 14:29:50 +02:00
Support debian bullseye and improve debian packages repo
This commit is contained in:
parent
0efb03d641
commit
0c9068b0a5
6 changed files with 96 additions and 22 deletions
|
@ -25,10 +25,15 @@ base__extra_packages: []
|
||||||
base__add_ethz: true
|
base__add_ethz: true
|
||||||
|
|
||||||
# add nonfree/firmware packages?
|
# add nonfree/firmware packages?
|
||||||
base__pkg_non_free_firmware: false
|
base__pkg_non_free_firmware: true
|
||||||
base__pkg_contrib: false
|
base__pkg_contrib: true
|
||||||
|
|
||||||
|
# add security repo
|
||||||
base__pkg_security: true
|
base__pkg_security: true
|
||||||
|
|
||||||
|
# add Debian Volatile
|
||||||
|
base__pkg_updates: true
|
||||||
|
|
||||||
# optionaly print some OS vars
|
# optionaly print some OS vars
|
||||||
base__print_os_vars: false
|
base__print_os_vars: false
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,17 @@ base__extra_packages: []
|
||||||
# - bar
|
# - bar
|
||||||
|
|
||||||
# should we add additional package source?
|
# should we add additional package source?
|
||||||
base__add_ethz: "{{ add_ethz }}"
|
base__add_ethz: true
|
||||||
# add nonfree/firmware packages?
|
# add nonfree/firmware packages?
|
||||||
base__pkg_non_free_firmware: "{{ base_pkg_non_free_firmware }}"
|
base__pkg_non_free_firmware: true
|
||||||
base__pkg_contrib: "{{ base_pkg_contrib }}"
|
base__pkg_contrib: true
|
||||||
|
|
||||||
|
# add security repo
|
||||||
base__pkg_security: true
|
base__pkg_security: true
|
||||||
|
|
||||||
|
# add Debian Volatile
|
||||||
|
base__pkg_updates: true
|
||||||
|
|
||||||
# optionaly print some OS vars
|
# optionaly print some OS vars
|
||||||
base__print_os_vars: "{{ print_os_vars }}"
|
base__print_os_vars: "{{ print_os_vars }}"
|
||||||
|
|
||||||
|
@ -25,7 +30,7 @@ base__upgrade_packages_to_latest_version: "{{ upgrade_packages_to_latest_version
|
||||||
base__install_keychain: true
|
base__install_keychain: true
|
||||||
|
|
||||||
# install vim as awesome command line editor
|
# install vim as awesome command line editor
|
||||||
base__install_vim: "{{ editor_is_vim }}"
|
base__install_vim: true
|
||||||
|
|
||||||
# directlink to keychain becaus RHEL do not provide it...
|
# directlink to keychain becaus RHEL do not provide it...
|
||||||
_base__keychain_rpm: 'http://packages.psychotic.ninja/7/base/x86_64/RPMS//keychain-2.8.0-3.el7.psychotic.noarch.rpm'
|
_base__keychain_rpm: 'http://packages.psychotic.ninja/7/base/x86_64/RPMS//keychain-2.8.0-3.el7.psychotic.noarch.rpm'
|
||||||
|
@ -34,25 +39,13 @@ _base__keychain_rpm: 'http://packages.psychotic.ninja/7/base/x86_64/RPMS//keycha
|
||||||
# LEGACY VARS
|
# LEGACY VARS
|
||||||
# ++ WILL BE REMOVED SOON ++
|
# ++ WILL BE REMOVED SOON ++
|
||||||
# add eth zurich apt source
|
# add eth zurich apt source
|
||||||
add_ethz: true
|
|
||||||
|
|
||||||
|
|
||||||
# do we want the latest package version or just upgrade manually?
|
# do we want the latest package version or just upgrade manually?
|
||||||
upgrade_packages_to_latest_version: false
|
upgrade_packages_to_latest_version: false
|
||||||
|
|
||||||
|
|
||||||
# we use vim!
|
|
||||||
editor_is_vim: true
|
|
||||||
|
|
||||||
# print os variables
|
# print os variables
|
||||||
print_os_vars: false
|
print_os_vars: false
|
||||||
|
|
||||||
# do we want non-free firmware from eth zuerich?
|
|
||||||
base_pkg_non_free_firmware: false
|
|
||||||
|
|
||||||
# do we want contrib from eth zuerich?
|
|
||||||
base_pkg_contrib: false
|
|
||||||
|
|
||||||
# mailx for debian (recomended for unattended_upgrades role
|
# mailx for debian (recomended for unattended_upgrades role
|
||||||
base__install_mailx: true
|
base__install_mailx: true
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: add eth zurich apt (main)
|
- name: add eth zurich apt for Debian > 10
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "templates/apt.sources.list.j2"
|
src: "templates/apt.sources.list.j2"
|
||||||
|
@ -25,6 +25,18 @@
|
||||||
group: root
|
group: root
|
||||||
owner: root
|
owner: root
|
||||||
notify: apt update
|
notify: apt update
|
||||||
|
when: ansible_distribution_major_version < '11'
|
||||||
|
|
||||||
|
- name: add eth zurich apt for Debian < 11
|
||||||
|
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: 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
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Debian mirror der ETH Zürich
|
# Debian mirror der ETH Zürich
|
||||||
# https://debian.ethz.ch/
|
# https://debian.ethz.ch/
|
||||||
|
# https://wiki.debianforum.de/Sources.list
|
||||||
|
|
||||||
# HTTPS mirror:
|
# HTTPS mirror:
|
||||||
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
|
deb https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
|
||||||
|
@ -21,7 +22,7 @@ deb-src https://debian.ethz.ch/debian {{ ansible_distribution_release }} main
|
||||||
|
|
||||||
{%- if base__pkg_security | bool -%}
|
{%- if base__pkg_security | bool -%}
|
||||||
# Inofficial Security Mirror
|
# Inofficial Security Mirror
|
||||||
deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates main
|
deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security main
|
||||||
{%- if base__pkg_contrib | bool -%}
|
{%- if base__pkg_contrib | bool -%}
|
||||||
{{- ' contrib' -}}
|
{{- ' contrib' -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
@ -29,7 +30,26 @@ deb https://security.debian.ethz.ch/ {{ ansible_distribution_release }}/updates
|
||||||
{{- ' non-free' -}}
|
{{- ' non-free' -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{{- '\n' -}}
|
{{- '\n' -}}
|
||||||
deb http://security.debian.org/ {{ ansible_distribution_release }}/updates main
|
deb-src https://security.debian.ethz.ch/ {{ ansible_distribution_release }}-security 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 -%}
|
||||||
|
deb http://deb.debian.org/debian stable-updates main
|
||||||
|
{%- if base__pkg_contrib | bool -%}
|
||||||
|
{{- ' contrib' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if base__pkg_non_free_firmware | bool -%}
|
||||||
|
{{- ' non-free' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{{- '\n' -}}
|
||||||
|
deb-src http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main
|
||||||
{%- if base__pkg_contrib | bool -%}
|
{%- if base__pkg_contrib | bool -%}
|
||||||
{{- ' contrib' -}}
|
{{- ' contrib' -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
44
templates/apt.sources.list_legacy.j2
Normal file
44
templates/apt.sources.list_legacy.j2
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# 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 http://security.debian.org/ {{ 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 -%}
|
||||||
|
|
||||||
|
# Contact for proplems with the mirror:
|
||||||
|
# https://readme.phys.ethz.ch/services/contact/
|
||||||
|
# Or #isgphys on irc.phys.ethz.ch
|
|
@ -61,5 +61,5 @@ base__linux_packages:
|
||||||
- bzip2
|
- bzip2
|
||||||
- jq
|
- jq
|
||||||
|
|
||||||
playbook_version_number: 9014
|
playbook_version_number: 9015
|
||||||
playbook_version_path: 'base-packages_roles-ansible_github.version'
|
playbook_version_path: 'base-packages_roles-ansible_github.version'
|
||||||
|
|
Loading…
Reference in a new issue