browbeat/ansible/install/shaker_build.yml
Masco Kaliyamoorthy 461b016f13 use tripleo-ansible-inventry to generate hosts
Change-Id: I54d6eba518910e6651758bc7d46624bafacaef6c
2021-03-30 21:19:14 +05:30

26 lines
730 B
YAML

---
#
# Playbook to build shaker-image
#
- hosts: Browbeat
remote_user: "{{ browbeat_user }}"
tasks:
- name: Check external connectivity
command: ping -c 1 google.com
register: ping
ignore_errors: true
- name: Fail if no external connectivity
fail:
msg: "There should be external connectivity to build shaker image"
when: ping.rc != 0
- name: Build shaker image
shell: >
source {{ overcloudrc }}; source {{ shaker_venv }}/bin/activate;
shaker-image-builder --image-builder-mode dib --image-builder-distro
{{shaker_image}} --os-region-name {{ shaker_region }}
register: image_result
failed_when: image_result.rc != 0