Skip to content

Commit

Permalink
🚀 Add non-free-firmware to Debian 12+
Browse files Browse the repository at this point in the history
  • Loading branch information
HanXHX committed Apr 30, 2024
1 parent dd7208e commit 4e27dfe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ This role bootstraps Debian/Devuan/Ubuntu/Raspbian hosts:
Supported versions

| OS | Working | Stable (active support) |
| ---------------------- | ------- | ----------------------- |
| Debian Stretch (9) | Yes | Yes |
| ---------------------- | ------- |-------------------------|
| Debian Stretch (9) | Yes | No |
| Debian Buster (10) | Yes | Yes |
| Debian Bullseye (11) | Yes | Yes |
| Debian Bookworm (12) | Yes | No |
| Debian Bookworm (12) | Yes | Yes |
| Devuan Ascii (2) | Yes | No |
| Raspbian Stretch (9) | Experimental | No |
| Raspbian Buster (10) | Experimental | No |
Expand All @@ -47,7 +47,7 @@ Theses variables define hostname to configure APT (normal repo and backports):

- `dbs_apt_default_host`: repository host. It can replace the last one (installed with this role) with a new one
- `dbs_apt_use_src`: install "deb-src" repositories (default: false)
- `dbs_apt_components`: components uses in sources.list (default: "main contrib non-free")
- `dbs_apt_components`: components uses in sources.list (default: "main contrib non-free non-free-firmware")

### Role setup

Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# -------------------------
dbs_apt_default_host: "deb.debian.org"
dbs_apt_use_src: false
dbs_apt_components: "main contrib non-free"
dbs_apt_components: "main contrib non-free{% if ansible_distribution_major_version is version('12', '>=') and ansible_distribution == 'Debian' %} non-free-firmware{% endif %}"
dbs_repo_old: "{% if ansible_local | d() and ansible_local.apt_sources | d() and ansible_local.apt_sources.dbs_repo_old | d() and ansible_local.apt_sources.dbs_repo_old | d() %}{{ ansible_local.apt_sources.dbs_repo_old }}{% else %}['dummy']{% endif %}"

# -------------------------
Expand Down
3 changes: 3 additions & 0 deletions vars/Debian/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---

dbs_repo_new:
- "http://{{ dbs_apt_default_host }}/debian {{ ansible_distribution_release }} {{ dbs_apt_components }}"
- "http://{{ dbs_apt_default_host }}/debian {{ ansible_distribution_release }}-updates {{ dbs_apt_components }}"
- "{{ dbs_repo_security if (ansible_distribution_version is version('11', '>=')) else dbs_repo_security_legacy }}"
- "http://{{ dbs_apt_default_host }}/debian {{ ansible_distribution_release }}-backports {{ dbs_apt_components }}"

# Security repo pattern from Debian 11
dbs_repo_security: "http://security.debian.org/debian-security {{ ansible_distribution_release }}-security {{ dbs_apt_components }}"

# Legacy security repo
dbs_repo_security_legacy: "http://security.debian.org/ {{ ansible_distribution_release }}/updates {{ dbs_apt_components }}"

0 comments on commit 4e27dfe

Please sign in to comment.