zuul-jobs/test-playbooks/base-roles/configure-mirrors.yaml
Clark Boylan 9471b8c42b Add option to prefer https/ssl in configure-mirrors
We should offer the option of https in addition to http in our
configure-mirrors role as users may want to consume mirrors using https.
This has become more viable in recent years with the releases of Debian
Buster and Ubuntu Bionic supporting it out of the box.

Change-Id: I747c1a379dfce9469e643d7fa199c8e8554f5289
2020-05-20 15:16:34 -07:00

40 lines
1.2 KiB
YAML

- name: Test the configure-mirrors role with http
hosts: all
roles:
- role: configure-mirrors
mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
set_apt_mirrors_trusted: True
post_tasks:
- name: Set emacs package fact for gentoo
set_fact:
emacs_package: app-editors/emacs
when: ansible_distribution == 'Gentoo'
- name: Install a package to sanity check the http mirror configuration
package:
name: "{{ emacs_package | default('emacs') }}"
state: "present"
become: yes
- name: Test the configure-mirrors role with https
hosts: all
roles:
- role: configure-mirrors
mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
mirror_use_ssl: True
set_apt_mirrors_trusted: True
post_tasks:
- name: Set emacs package fact for gentoo
set_fact:
emacs_package: app-editors/emacs
when: ansible_distribution == 'Gentoo'
- name: Remove existing emacs package install
package:
name: "{{ emacs_package | default('emacs') }}"
state: "absent"
become: yes
- name: Install a package to sanity check the https mirror configuration
package:
name: "{{ emacs_package | default('emacs') }}"
state: "present"
become: yes