|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
- set_fact:
|
|
|
|
|
test_ppa_name: 'ppa:git-core/ppa'
|
|
|
|
|
test_ppa_filename: 'git-core'
|
|
|
|
|
test_ppa_spec: 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu {{ansible_distribution_release}} main'
|
|
|
|
|
test_ppa_spec: 'deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu {{ansible_distribution_release}} main'
|
|
|
|
|
test_ppa_key: 'E1DF1F24' # http://keyserver.ubuntu.com:11371/pks/lookup?search=0xD06AAF4C11DAB86DF421421EFE6B20ECA7AD98A1&op=index
|
|
|
|
|
|
|
|
|
|
- name: show python version
|
|
|
|
@ -288,6 +288,47 @@
|
|
|
|
|
apt: pkg=local-apt-repository state=absent purge=yes
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# TEST: PPA HTTPS URL
|
|
|
|
|
#
|
|
|
|
|
- name: Add PPA using HTTPS URL
|
|
|
|
|
apt_repository:
|
|
|
|
|
repo: 'ppa:deadsnakes'
|
|
|
|
|
filename: 'deadsnakes'
|
|
|
|
|
state: present
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
- name: Check if PPA using HTTPS URL is added
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- 'result.changed'
|
|
|
|
|
- 'result.state == "present"'
|
|
|
|
|
- 'result.repo == "ppa:deadsnakes"'
|
|
|
|
|
|
|
|
|
|
- name: 'examine source file'
|
|
|
|
|
stat:
|
|
|
|
|
path: '/etc/apt/sources.list.d/deadsnakes.list'
|
|
|
|
|
register: source_file
|
|
|
|
|
|
|
|
|
|
- name: 'assert source file exists'
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- 'source_file.stat.exists == True'
|
|
|
|
|
|
|
|
|
|
- name: Check if the PPA URL
|
|
|
|
|
shell: "grep 'https://ppa.launchpadcontent.net' /etc/apt/sources.list.d/deadsnakes.list"
|
|
|
|
|
register: r
|
|
|
|
|
|
|
|
|
|
- name: Test if PPA URL points to https URL
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- r.changed
|
|
|
|
|
- "'https://ppa.launchpadcontent.net' in r.stdout"
|
|
|
|
|
|
|
|
|
|
- name: Remove PPA file
|
|
|
|
|
file:
|
|
|
|
|
path: '/etc/apt/sources.list.d/deadsnakes.list'
|
|
|
|
|
state: absent
|
|
|
|
|
#
|
|
|
|
|
# TEARDOWN
|
|
|
|
|
#
|
|
|
|
|
- import_tasks: 'cleanup.yml'
|
|
|
|
|