summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning/openstack/prerequisites.yml
diff options
context:
space:
mode:
authorDavis Phillips <davis.phillips@gmail.com>2017-09-07 10:14:56 -0500
committerDavis Phillips <davis.phillips@gmail.com>2017-09-07 10:14:56 -0500
commit4ec2795d2978a602087d677799ddd8b9f941ee28 (patch)
treef23cb4c061741d85bd2b1a0bf0c77e04d7378c52 /playbooks/provisioning/openstack/prerequisites.yml
parent90889d6be26eab6d6873d9063c3d8e2384ff9464 (diff)
parent1013e6ceefc83a182f231ab7d178676e4d996ceb (diff)
downloadopenshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.gz
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.bz2
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.xz
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.zip
updating rhsm-sub and rhsm-repos
Diffstat (limited to 'playbooks/provisioning/openstack/prerequisites.yml')
-rw-r--r--playbooks/provisioning/openstack/prerequisites.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/playbooks/provisioning/openstack/prerequisites.yml b/playbooks/provisioning/openstack/prerequisites.yml
index 71a99fc82..f2f720f8b 100644
--- a/playbooks/provisioning/openstack/prerequisites.yml
+++ b/playbooks/provisioning/openstack/prerequisites.yml
@@ -20,6 +20,16 @@
that: 'shade_result.rc == 0'
msg: "Python module shade is not installed"
+ # Check jmespath
+ - name: Try to import python module shade
+ command: python -c "import jmespath"
+ ignore_errors: yes
+ register: jmespath_result
+ - name: Check if jmespath is installed
+ assert:
+ that: 'jmespath_result.rc == 0'
+ msg: "Python module jmespath is not installed"
+
# Check python-dns
- name: Try to import python DNS module
command: python -c "import dns"
@@ -55,10 +65,12 @@
os_networks_facts:
name: "{{ openstack_external_network_name }}"
register: network_result
+ when: not openstack_provider_network_name|default(None)
- name: Check that network is available
assert:
that: "network_result.ansible_facts.openstack_networks"
msg: "Network {{ openstack_external_network_name }} is not available"
+ when: not openstack_provider_network_name|default(None)
# Check keypair
# TODO kpilatov: there is no Ansible module for getting OS keypairs
@@ -74,3 +86,35 @@
assert:
that: 'key_result.rc == 0'
msg: "Keypair {{ openstack_ssh_public_key }} is not available"
+
+# Check that custom images and flavors exist
+- hosts: localhost
+
+ # Include variables that will be used by heat
+ vars_files:
+ - stack_params.yaml
+
+ tasks:
+ # Check that custom images are available
+ - include: custom_image_check.yaml
+ with_items:
+ - "{{ openstack_master_image }}"
+ - "{{ openstack_infra_image }}"
+ - "{{ openstack_node_image }}"
+ - "{{ openstack_lb_image }}"
+ - "{{ openstack_etcd_image }}"
+ - "{{ openstack_dns_image }}"
+ loop_control:
+ loop_var: image
+
+ # Check that custom flavors are available
+ - include: custom_flavor_check.yaml
+ with_items:
+ - "{{ master_flavor }}"
+ - "{{ infra_flavor }}"
+ - "{{ node_flavor }}"
+ - "{{ lb_flavor }}"
+ - "{{ etcd_flavor }}"
+ - "{{ dns_flavor }}"
+ loop_control:
+ loop_var: flavor