From: Zack Cerza Date: Wed, 26 Aug 2015 16:19:09 +0000 (-0600) Subject: testnodes: Check for and remove custom apt repos X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=692cc3e2981e88f804c5b2fde89109b511b70203;p=ceph-cm-ansible.git testnodes: Check for and remove custom apt repos http://tracker.ceph.com/issues/12794 Signed-off-by: Zack Cerza --- diff --git a/roles/testnode/tasks/apt/repos.yml b/roles/testnode/tasks/apt/repos.yml index 41ae7db..e233954 100644 --- a/roles/testnode/tasks/apt/repos.yml +++ b/roles/testnode/tasks/apt/repos.yml @@ -1,4 +1,17 @@ --- +# Check for and remove custom repos. +# http://tracker.ceph.com/issues/12794 +- name: Check for custom repos + shell: "ls -1 /etc/apt/sources.list.d/" + register: custom_repos + changed_when: false + +- name: Remove custom repos + file: path=/etc/apt/sources.list.d/{{ item }} state=absent + with_items: custom_repos.stdout_lines + # Ignore changes here because we will be removing repos that we end up re-adding later + changed_when: false + - name: Set apt preferences template: dest: "/etc/apt/preferences.d/ceph.pref" @@ -39,6 +52,8 @@ mode: 0644 with_items: apt_repos|list + common_apt_repos|list register: local_apt_repos + # Ignore changes here because we might have just removed these repos seconds ago + changed_when: false - name: Update apt cache. apt: