Create final task including lmn_finish and lmn_tmpfixes
lmn_tmpfixes is used for: - temporary fixes and quirks - cleaning up stuff from obsolete/erroneous tasks lmn_finish is used for: - installing extra_pkg - setting ansible-stamps
This commit is contained in:
parent
88e650aae7
commit
a8e4130aa8
4 changed files with 32 additions and 261 deletions
|
@ -1,2 +0,0 @@
|
|||
extra_pkgs: []
|
||||
extra_pkgs_bpo: []
|
6
roles/lmn_finish/defaults/main.yml
Normal file
6
roles/lmn_finish/defaults/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
extra_pkgs: []
|
||||
extra_pkgs1: []
|
||||
extra_pkgs2: []
|
||||
extra_pkgs_bpo: []
|
||||
extra_pkgs_bpo1: []
|
||||
extra_pkgs_bpo2: []
|
|
@ -1,14 +1,11 @@
|
|||
---
|
||||
- name: Merge extra_pkgs and extra_pkgs_bpo lists
|
||||
ansible.builtin.set_fact:
|
||||
extra_pkgs: "{{ extra_pkgs + lookup('vars', 'extra_pkgs' + item, default=[]) }}"
|
||||
extra_pkgs_bpo: "{{ extra_pkgs_bpo + lookup('vars', 'extra_pkgs_bpo' + item, default=[]) }}"
|
||||
loop: "{{ range(1, 11) | map('string') | list }}"
|
||||
|
||||
- name: Install extra packages from stable
|
||||
ansible.builtin.apt:
|
||||
name: "{{ extra_pkgs }}"
|
||||
when: extra_pkgs|length
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
- "{{ extra_pkgs }}"
|
||||
- "{{ extra_pkgs1 }}"
|
||||
- "{{ extra_pkgs2 }}"
|
||||
|
||||
- name: Add backports for {{ ansible_distribution_release }}
|
||||
ansible.builtin.apt_repository:
|
||||
|
@ -17,11 +14,20 @@
|
|||
main non-free-firmware
|
||||
state: present
|
||||
update_cache: true
|
||||
when: extra_pkgs_bpo|length
|
||||
# when: extra_pkgs_bpo|length
|
||||
|
||||
- name: Install extra packages from backports
|
||||
ansible.builtin.apt:
|
||||
name: "{{ extra_pkgs_bpo }}"
|
||||
name: "{{ item }}"
|
||||
state: latest # noqa package-latest
|
||||
default_release: "{{ ansible_distribution_release }}-backports"
|
||||
when: extra_pkgs_bpo|length
|
||||
loop:
|
||||
- "{{ extra_pkgs_bpo }}"
|
||||
- "{{ extra_pkgs_bpo1 }}"
|
||||
- "{{ extra_pkgs_bpo2 }}"
|
||||
|
||||
- name: Timestamp successfull run and send up-to-date report
|
||||
ansible.builtin.shell:
|
||||
cmd: date --iso-8601=seconds >> /var/local/ansible-stamps && /usr/local/sbin/reporter
|
||||
changed_when: false
|
||||
tags: upgrade
|
Loading…
Add table
Add a link
Reference in a new issue