feat: move to dedicated repo
This commit is contained in:
commit
4a88a5b28d
54 changed files with 1524 additions and 0 deletions
42
tasks/apt/sources.yaml
Normal file
42
tasks/apt/sources.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
|
||||
# configure apt sources
|
||||
- name: "apt - config - configure apt sources"
|
||||
ansible.builtin.template:
|
||||
src: "templates/apt/sources.d/sources.list.{{ ansible_distribution }}.j2"
|
||||
dest: "/etc/apt/sources.list"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when:
|
||||
- 'ansible_os_family == "Debian"'
|
||||
- 'ansible_distribution_major_version <= "23"'
|
||||
notify: "apt force cache update"
|
||||
tags:
|
||||
- "apt"
|
||||
|
||||
# configure apt sources
|
||||
- name: "apt - config - configure apt sources"
|
||||
ansible.builtin.template:
|
||||
src: "templates/apt/sources.d/{{ ansible_distribution }}.sources.j2"
|
||||
dest: "/etc/apt/sources.list.d/ubuntu.sources"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when:
|
||||
- 'ansible_distribution == "Ubuntu"'
|
||||
- 'ansible_distribution_major_version >= "24"'
|
||||
notify: "apt force cache update"
|
||||
tags:
|
||||
- "apt"
|
||||
|
||||
# delete unused sources.list
|
||||
- name: "apt - config - remove old sources.list"
|
||||
ansible.builtin.file:
|
||||
path: "/etc/apt/sources.list"
|
||||
state: "absent"
|
||||
when:
|
||||
- 'ansible_distribution == "Ubuntu"'
|
||||
- 'ansible_distribution_major_version >= "24"'
|
||||
tags:
|
||||
- "apt"
|
||||
Loading…
Add table
Add a link
Reference in a new issue