ansible-test: apt cleanup and futher 18.04 fixes (#50906)

(cherry picked from commit bbad033a5e)
This commit is contained in:
Jordan Borean 2019-01-15 11:16:15 +10:00 committed by Toshio Kuratomi
parent 18a3916a76
commit 4ca81631b6
2 changed files with 8 additions and 2 deletions

View file

@ -27,8 +27,8 @@
- block:
- include: 'repo.yml'
always:
- apt_repository:
repo: "deb file:{{ repodir }} ./"
- file:
path: /etc/apt/sources.list.d/file_tmp_repo.list
state: absent
- file:
name: "{{ repodir }}"

View file

@ -135,6 +135,9 @@
stat: path='/var/cache/apt/pkgcache.bin'
register: cache_before
- name: ensure ppa key is present before adding repo that requires authentication
apt_key: keyserver=keyserver.ubuntu.com id='{{test_ppa_key}}' state=present
- name: 'name=<spec> (expect: pass)'
apt_repository: repo='{{test_ppa_spec}}' state=present
register: result
@ -167,6 +170,9 @@
stat: path='/var/cache/apt/pkgcache.bin'
register: cache_before
- name: ensure ppa key is present before adding repo that requires authentication
apt_key: keyserver=keyserver.ubuntu.com id='{{test_ppa_key}}' state=present
- name: 'name=<spec> filename=<filename> (expect: pass)'
apt_repository: repo='{{test_ppa_spec}}' filename='{{test_ppa_filename}}' state=present
register: result