added os-update playbook for debian
This commit is contained in:
16
roles/os-updates/tasks/update_mirrors.yaml
Normal file
16
roles/os-updates/tasks/update_mirrors.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
- name: Backup existing sources.list
|
||||
copy:
|
||||
src: /etc/apt/sources.list
|
||||
dest: /etc/apt/sources.list.bak
|
||||
remote_src: yes
|
||||
force: yes
|
||||
|
||||
|
||||
- name: Update sources.list with new mirrors
|
||||
template:
|
||||
src: sources.list.j2
|
||||
dest: /etc/apt/sources.list
|
||||
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
Reference in New Issue
Block a user