X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Froles%2Finit-system%2Ftasks%2Fapt.yml;h=a24e44aa49ae938a05a412da243cf1acd13cfc20;hb=3148030f2399683fa3f7e4a73ce1259e6e56254c;hp=f08f58f369c7186bd0fff03336f54ffb38ecb1d1;hpb=d533ccc3cea34e5cb8dfe8ba14578e10302870b9;p=ansible.git diff --git a/playbooks/debian/roles/init-system/tasks/apt.yml b/playbooks/debian/roles/init-system/tasks/apt.yml index f08f58f..a24e44a 100644 --- a/playbooks/debian/roles/init-system/tasks/apt.yml +++ b/playbooks/debian/roles/init-system/tasks/apt.yml @@ -1,3 +1,12 @@ +- name: Check backports + shell: "grep -Fc backports /etc/apt/sources.list || :" + register: apt_configured + changed_when: apt_configured.stdout == "0" + +- debug: + msg: "apt has already been configured" + when: apt_configured.stdout != "0" + - name: Configure apt become: true template: @@ -6,6 +15,7 @@ owner: root group: root mode: '0640' + when: apt_configured.stdout == "0" - name: Install minimal software packages become: true