f349038b1d
The epel-release package provides a yum repository configuration for EPEL, and points to the upstream EPEL mirrors. In some cases this is undesirable, such as when a local EPEL mirror is available, or access to the public repositories is not possible. This change makes it possible to skip installation of epel-release, by setting 'yum_install_epel' to 'false'. Change-Id: Ib685b0c3e21df01c4dd177771f019fae4bb90e66 Story: 2003277 Task: 24218
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
---
|
|
- name: Ensure CentOS cloud image is registered with Glance
|
|
hosts: controllers[0]
|
|
vars:
|
|
os_shade_venv: "{{ virtualenv_path }}/shade"
|
|
roles:
|
|
- role: stackhpc.os-shade
|
|
os_shade_install_epel: "{{ yum_install_epel }}"
|
|
tasks:
|
|
- name: Ensure image download directory exists
|
|
file:
|
|
path: "{{ image_cache_path }}"
|
|
state: directory
|
|
|
|
- name: Ensure CentOS 7 cloud image is downloaded
|
|
get_url:
|
|
url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
|
|
dest: "{{ image_cache_path }}/CentOS-7-x86_64-GenericCloud.qcow2"
|
|
|
|
# Note that setting this via a play or task variable seems to not
|
|
# evaluate the Jinja variable reference, so we use set_fact.
|
|
- name: Update the Ansible python interpreter fact to point to the shade virtualenv
|
|
set_fact:
|
|
ansible_python_interpreter: "{{ os_shade_venv }}/bin/python"
|
|
|
|
- name: Ensure test deployment image is registered with Glance
|
|
os_image:
|
|
auth: "{{ openstack_auth }}"
|
|
name: centos7
|
|
container_format: bare
|
|
disk_format: qcow2
|
|
state: present
|
|
filename: "{{ image_cache_path }}/CentOS-7-x86_64-GenericCloud.qcow2"
|