diff options
5 files changed, 28 insertions, 2 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index 38bc3ad6b..997634777 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -10,7 +10,14 @@ from collections import Mapping from distutils.util import strtobool from distutils.version import LooseVersion from operator import itemgetter -import OpenSSL.crypto + +HAS_OPENSSL=False +try: + import OpenSSL.crypto + HAS_OPENSSL=True +except ImportError: + pass + import os import pdb import pkg_resources @@ -516,6 +523,9 @@ class FilterModule(object): if not isinstance(internal_hostnames, list): raise errors.AnsibleFilterError("|failed expects internal_hostnames is list") + if not HAS_OPENSSL: + raise errors.AnsibleFilterError("|missing OpenSSL python bindings") + for certificate in certificates: if 'names' in certificate.keys(): continue diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml index 57d4fe4b6..b7f0267c1 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml @@ -1,7 +1,7 @@ - name: Backup etcd hosts: etcd_hosts_to_backup vars: - embedded_etcd: "{{ hostvars[groups.oo_first_master.0].openshift.master.embedded_etcd }}" + embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}" timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" roles: - openshift_facts diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml b/playbooks/common/openshift-cluster/upgrades/etcd/main.yml index cce844403..192799376 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/main.yml @@ -14,6 +14,9 @@ connection: local become: no tasks: + - fail: + msg: 'The etcd upgrade playbook does not support upgrading embedded etcd, simply run the normal playbooks and etcd will be upgraded when your master is updated.' + when: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}" - name: Evaluate etcd_hosts_to_upgrade add_host: name: "{{ item }}" diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml index e0afc43ba..31a13aa2a 100644 --- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml @@ -116,6 +116,7 @@ ansible_become: "{{ deployment_vars[deployment_type].become }}" groups: "tag_environment-{{ cluster_env }}, tag_host-type-{{ type }}, tag_sub-host-type-{{ g_sub_host_type }}, tag_clusterid-{{ cluster_id }}" openshift_node_labels: "{{ node_label }}" + libvirt_ip_address: "{{ item.1 }}" with_together: - '{{ instances }}' - '{{ ips }}' diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml index 7e037f2af..f460b14c8 100644 --- a/playbooks/openstack/openshift-cluster/launch.yml +++ b/playbooks/openstack/openshift-cluster/launch.yml @@ -107,6 +107,9 @@ groups: 'meta-environment_{{ cluster_env }}, meta-host-type_etcd, meta-sub-host-type_default, meta-clusterid_{{ cluster_id }}' openshift_node_labels: type: "etcd" + openstack: + public_v4: '{{ item[2] }}' + private_v4: '{{ item[1] }}' with_together: - '{{ parsed_outputs.etcd_names }}' - '{{ parsed_outputs.etcd_ips }}' @@ -121,6 +124,9 @@ groups: 'meta-environment_{{ cluster_env }}, meta-host-type_master, meta-sub-host-type_default, meta-clusterid_{{ cluster_id }}' openshift_node_labels: type: "master" + openstack: + public_v4: '{{ item[2] }}' + private_v4: '{{ item[1] }}' with_together: - '{{ parsed_outputs.master_names }}' - '{{ parsed_outputs.master_ips }}' @@ -135,6 +141,9 @@ groups: 'meta-environment_{{ cluster_env }}, meta-host-type_node, meta-sub-host-type_compute, meta-clusterid_{{ cluster_id }}' openshift_node_labels: type: "compute" + openstack: + public_v4: '{{ item[2] }}' + private_v4: '{{ item[1] }}' with_together: - '{{ parsed_outputs.node_names }}' - '{{ parsed_outputs.node_ips }}' @@ -149,6 +158,9 @@ groups: 'meta-environment_{{ cluster_env }}, meta-host-type_node, meta-sub-host-type_infra, meta-clusterid_{{ cluster_id }}' openshift_node_labels: type: "infra" + openstack: + public_v4: '{{ item[2] }}' + private_v4: '{{ item[1] }}' with_together: - '{{ parsed_outputs.infra_names }}' - '{{ parsed_outputs.infra_ips }}' |