octavia/playbooks/image-build/run.yaml
OpenDev Sysadmins 0126918334 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:36:42 +00:00

48 lines
1.4 KiB
YAML

- hosts: all
tasks:
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: "latest"
update_cache: yes
register: install_packages
become: yes
until: install_packages|success
retries: 5
delay: 2
with_items:
- qemu-utils
- uuid-runtime
- curl
- kpartx
- python-yaml
- debootstrap
- qemu
- name: Install required pip packages
pip:
name: "{{ item }}"
state: "latest"
virtualenv: /var/tmp/venv
register: install_packages
until: install_packages|success
retries: 5
delay: 2
become: yes
with_items:
- diskimage-builder
- name: Ensure artifacts/images directory exists
file:
path: '{{ ansible_user_dir }}/test-images'
state: directory
- name: Build an amphora image for publishing
shell: >-
. /var/tmp/venv/bin/activate && \
./diskimage-create.sh -o {{ ansible_user_dir }}/test-images/test-only-amphora-x64-haproxy-{{ amphora_os }}-{{ amphora_os_release }}.qcow2 \
-i {{ amphora_os }} \
-d {{ amphora_os_release }} \
-s {{ amphora_image_size | default(2) }}
args:
chdir: "{{ ansible_user_dir }}/src/opendev.org/openstack/octavia/diskimage-create"
tags:
- skip_ansible_lint