diff --git a/tasks/repository.yml b/tasks/repository.yml index 7724076..764f416 100644 --- a/tasks/repository.yml +++ b/tasks/repository.yml @@ -30,7 +30,7 @@ - name: repository | add ansible.builtin.apt_repository: repo: "{{ item.type }} {{ item.url }} {{ item.component }}" - state: present + state: "{{ item.state | default('present') }}" update_cache: true mode: 0644 with_items: "{{ virtualbox_repositories }}" diff --git a/vars/main.yml b/vars/main.yml index 678db19..4501fe4 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,9 +9,11 @@ virtualbox_repositories: - type: 'deb [arch=amd64]' url: "https://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }}" component: contrib + state: absent - type: 'deb [arch=amd64]' url: "http://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }}" component: contrib + state: absent virtualbox_dependencies_pre: - software-properties-common