diff options
Diffstat (limited to 'roles/sane_debian_system/tasks/apt.yml')
-rw-r--r-- | roles/sane_debian_system/tasks/apt.yml | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/roles/sane_debian_system/tasks/apt.yml b/roles/sane_debian_system/tasks/apt.yml index 13937c9..3f1fd5e 100644 --- a/roles/sane_debian_system/tasks/apt.yml +++ b/roles/sane_debian_system/tasks/apt.yml @@ -39,23 +39,27 @@ src: sources.list.j2 dest: /etc/apt/sources.list -- name: additional sources.list.d/* - with_items: "{{ sane_debian_system_sources_lists }}" - apt_repository: - repo: "{{ item.repo }}" - update_cache: no +- name: "update package lists" + apt: + update_cache: yes - name: install necessary tools apt: name: - sudo - - gpg + +- name: additional sources.list.d/* + with_items: "{{ sane_debian_system_sources_lists }}" + apt_repository: + repo: "{{ item.repo }}" + update_cache: no - name: add archive signing keys with_items: "{{ sane_debian_system_sources_lists }}" - apt_key: - data: "{{ item.signing_key }}" - state: present + shell: | + key="{{ item.signing_key }}" + sum="$(echo -n "$key" | sha1sum | awk '{ print $1 }')" + echo "$key" > "/etc/apt/trusted.gpg.d/$sum.asc" when: item.signing_key is defined # Use shell to run apt-get to update package lists so that we can pass |