Move extrapackage installation into separate role and make it more flexible
- Introduce `extra_pkgs1` - `extra_pkgs10` - Introduce `extra_pkgs_bpo1` - `extra_pkgs_bpo10` - Move package-list from lmn_teacherlaptop into inventory as extra_pkgs1
This commit is contained in:
parent
4dafbd8b85
commit
c00d5566dd
8 changed files with 482 additions and 482 deletions
|
@ -1,2 +0,0 @@
|
|||
extra_pkgs: ""
|
||||
extra_pkgs_bpo: ""
|
|
@ -16,6 +16,8 @@
|
|||
- name: Looks like dpkg was interrupted, configure manually
|
||||
ansible.builtin.command:
|
||||
cmd: dpkg --configure -a
|
||||
register: dpkg_configure_result
|
||||
changed_when: dpkg_configure_result.rc != 0
|
||||
- name: Try again to upgrade packages
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
|
@ -25,26 +27,3 @@
|
|||
- name: Install etckeeper
|
||||
ansible.builtin.apt:
|
||||
name: etckeeper
|
||||
state: latest # noqa package-latest
|
||||
|
||||
- name: Install extra packages from stable
|
||||
ansible.builtin.apt:
|
||||
name: "{{ extra_pkgs }}"
|
||||
state: latest # noqa package-latest
|
||||
when: extra_pkgs|length
|
||||
|
||||
- name: Add backports for {{ ansible_distribution_release }}
|
||||
ansible.builtin.apt_repository:
|
||||
repo: >
|
||||
deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-backports
|
||||
main non-free-firmware
|
||||
state: present
|
||||
update_cache: true
|
||||
when: extra_pkgs_bpo|length
|
||||
|
||||
- name: Install extra packages from backports
|
||||
ansible.builtin.apt:
|
||||
name: "{{ extra_pkgs_bpo }}"
|
||||
state: latest # noqa package-latest
|
||||
default_release: "{{ ansible_distribution_release }}-backports"
|
||||
when: extra_pkgs_bpo|length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue