diff --git a/handlers/main.yml b/handlers/main.yml index a0907ad6..54ce95e5 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -84,11 +84,6 @@ name: it_does_not_matter daemon_reload: yes -- name: Remove generated apt keys from LXC host - file: - path: /root/repo.keys - state: absent - - name: Remove rootfs archive file: path: "/tmp/{{ cache_basename }}" diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index cf18371d..f14ebddf 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -69,23 +69,6 @@ to ensure they're available otherwise disable the quota system by setting `lxc_host_machine_quota_disabled` to true. -- block: - - name: Generate apt keys from LXC host for the container cache - shell: "apt-key exportall" - changed_when: false - register: _apt_exportall - tags: - - skip_ansible_lint - - - name: Write exported keys to temporary file - copy: - content: "{{ _apt_exportall.stdout }}" - dest: "/root/repo.keys" - notify: - - Remove generated apt keys from LXC host - when: - - ansible_pkg_mgr == 'apt' - # NOTE(cloudnull): We're using rsync and an if block because we've no means # to loop over a block. Re-evaluate this task when/if this is # merged https://github.com/ansible/ansible/issues/13262 diff --git a/templates/prep-scripts/ubuntu_16_prep.sh.j2 b/templates/prep-scripts/ubuntu_16_prep.sh.j2 index f85a5910..524965ff 100644 --- a/templates/prep-scripts/ubuntu_16_prep.sh.j2 +++ b/templates/prep-scripts/ubuntu_16_prep.sh.j2 @@ -5,8 +5,6 @@ set -e -x {% include 'templates/prep-scripts/_container_sys_setup.sh.j2' %} -apt-key add -v /root/repo.keys -rm /root/repo.keys export DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge snap* lxc* lxd* resolvconf* || true diff --git a/vars/ubuntu-16.04.yml b/vars/ubuntu-16.04.yml index 18581397..df791ef8 100644 --- a/vars/ubuntu-16.04.yml +++ b/vars/ubuntu-16.04.yml @@ -22,10 +22,10 @@ _lxc_cache_map: copy_from_host: - /etc/apt/sources.list - /etc/apt/apt.conf.d/ + - /etc/apt/trusted.gpg.d - /etc/apt/preferences.d/ - /etc/environment - /etc/localtime - - /root/repo.keys - /etc/protocols _lxc_cache_prep_template: "prep-scripts/ubuntu_16_prep.sh.j2"