diff options
author | 2016-08-18 10:34:39 +0200 | |
---|---|---|
committer | 2016-08-18 11:54:08 +0200 | |
commit | 4a82d2065157e8ae901eea13883a72bfd5313472 (patch) | |
tree | f4b877321430dd120cd013b8d990d4231e8a6070 /prototypes/bifrost/playbooks | |
parent | 7c82a3be275f4f5b8589e86368bf6948c9984f0a (diff) |
Add initial playbooks and scripts for bifrost POCS
Change-Id: Ic7e33f53d0111b0e833d7547fff16458506b063b
Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Diffstat (limited to 'prototypes/bifrost/playbooks')
-rw-r--r-- | prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml new file mode 100644 index 000000000..f193ea8d0 --- /dev/null +++ b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml @@ -0,0 +1,66 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 RedHat and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- hosts: localhost + connection: local + name: "Setting pre-test conditions" + become: yes + ignore_errors: yes + tasks: + - name: Remove pre-existing leases file + file: path=/var/lib/misc/dnsmasq.leases state=absent +- hosts: localhost + connection: local + name: "Executes install, enrollment, and testing in one playbook" + become: no + gather_facts: yes + pre_tasks: + - name: "Override the ipv4_gateway setting" + set_fact: + ipv4_gateway: "192.168.122.1" + roles: + - { role: bifrost-prep-for-install, when: skip_install is not defined } + environment: + http_proxy: "{{ lookup('env','http_proxy') }}" + https_proxy: "{{ lookup('env','https_proxy') }}" +- hosts: localhost + connection: local + name: "Executes install, enrollment, and testing in one playbook" + become: yes + gather_facts: yes + roles: + - role: bifrost-ironic-install + cleaning: false + testing: true + # NOTE(TheJulia): While the next step creates a ramdisk, some elements + # do not support ramdisk-image-create as they invoke steps to cleanup + # the ramdisk which causes ramdisk-image-create to believe it failed. + - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_os_release: "jessie", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true } + - { role: bifrost-create-dib-image, dib_imagetype: "qcow2", dib_imagename: "{{deploy_image}}", dib_os_element: "ubuntu-minimal", dib_os_release: "trusty", dib_elements: "vm serial-console simple-init devuser infra-cloud-bridge puppet growroot {{ extra_dib_elements|default('') }}", dib_packages: "openssh-server,vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog", when: create_image_via_dib | bool == true and transform_boot_image | bool == false } + environment: + http_proxy: "{{ lookup('env','http_proxy') }}" + https_proxy: "{{ lookup('env','https_proxy') }}" +- hosts: baremetal + name: "Enroll node with Ironic" + become: no + connection: local + roles: + - role: ironic-enroll-dynamic + - { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true } +- hosts: baremetal + vars: + multinode_testing: "{{ inventory_dhcp | bool == true }}" + name: "Create configuration drive files and deploy machines." + become: no + connection: local + roles: + - role: bifrost-configdrives-dynamic + - role: bifrost-deploy-nodes-dynamic + - role: bifrost-prepare-for-test-dynamic + serial: 1 |