feat(common): setup additional components to apt source list
This commit is contained in:
parent
223cbfb877
commit
9cdcef9dca
3 changed files with 27 additions and 0 deletions
|
@ -1,4 +1,26 @@
|
|||
---
|
||||
- name: '[common] merge with custom vars'
|
||||
set_fact:
|
||||
common: "{{ common|combine(custom_common) }}"
|
||||
changed_when: false
|
||||
|
||||
- name: '[apt] verify components of default sources'
|
||||
block:
|
||||
- name: '[apt] default source.list'
|
||||
ansible.builtin.replace:
|
||||
path: '/etc/apt/sources.list'
|
||||
regexp: '^(deb((?!{{ item }}).)+)$'
|
||||
replace: '\1 {{ item }}'
|
||||
when: not common.deb822_format | bool
|
||||
loop: '{{ common.apt_components }}'
|
||||
- name: '[apt] default deb822 debian.sources'
|
||||
ansible.builtin.replace:
|
||||
path: '/etc/apt/sources.list.d/debian.sources'
|
||||
regexp: '^(Components: ((?!{{ item }}).)+)$'
|
||||
replace: '\1 {{ item }}'
|
||||
loop: '{{ common.apt_components }}'
|
||||
when: common.deb822_format | bool
|
||||
|
||||
- name: '[apt] install dependencies and tools'
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue