Enable extrepo

This commit is contained in:
Raphael Dannecker 2026-01-28 09:01:30 +01:00
parent 2f6db27a38
commit 78f558feaf
2 changed files with 12 additions and 10 deletions

View file

@ -19,16 +19,12 @@
- name: Activate contrib and non-free repos for extrepo
ansible.builtin.lineinfile:
dest: /etc/extrepo/config.yaml
regexp: '^#\s*-\s*(contrib|non-free)'
line: '- \1'
backrefs: true
- name: Enable extrepo
ansible.builtin.command:
cmd: extrepo enable
register: extrepo_enable
changed_when: "'enabled' in extrepo_enable.stdout"
path: /etc/extrepo/config.yaml
regexp: '^# - {{ item }}'
line: '- {{ item }}'
with_items:
- contrib
- non-free
- name: Allow sudo without password for user
ansible.builtin.lineinfile:

View file

@ -11,6 +11,12 @@
register: extrepo_update
changed_when: "'No updates' not in extrepo_update.stdout"
- name: Enable VirtualBox repository using extrepo
ansible.builtin.command:
cmd: extrepo enable virtualbox
register: extrepo_enable
changed_when: "'enabled' in extrepo_enable.stdout"
- name: Update package cache
ansible.builtin.apt:
update_cache: true