Browse Source

Namespace the OpenStack vars

This makes sure that all the variables used in the `openshift_openstack`
role are prefixed with `openshift_openstack_` as is the convention.
Tomas Sedovic 7 years ago
parent
commit
b951705036

+ 6 - 6
playbooks/openstack/README.md

@@ -142,27 +142,27 @@ corresponding to your OpenStack installation.
 $ vi inventory/group_vars/all.yml
 $ vi inventory/group_vars/all.yml
 ```
 ```
 
 
-1. Set the `openstack_keypair_name` to your OpenStack keypair name.
+1. Set the `openshift_openstack_keypair_name` to your OpenStack keypair name.
    - See `openstack keypair list` to find the keypairs registered with
    - See `openstack keypair list` to find the keypairs registered with
    OpenShift.
    OpenShift.
    - This must correspond to your private SSH key in `~/.ssh/id_rsa`
    - This must correspond to your private SSH key in `~/.ssh/id_rsa`
-2. Set the `openstack_external_network_name` to the floating IP
+2. Set the `openshift_openstack_external_network_name` to the floating IP
    network of your openstack.
    network of your openstack.
    - See `openstack network list` for the list of networks.
    - See `openstack network list` for the list of networks.
    - It's often called `public`, `external` or `ext-net`.
    - It's often called `public`, `external` or `ext-net`.
-3. Set the `openstack_default_image_name` to the image you want your
+3. Set the `openshift_openstack_default_image_name` to the image you want your
    OpenShift VMs to run.
    OpenShift VMs to run.
    - See `openstack image list` for the list of available images.
    - See `openstack image list` for the list of available images.
-4. Set the `openstack_default_flavor` to the flavor you want your
+4. Set the `openshift_openstack_default_flavor` to the flavor you want your
    OpenShift VMs to use.
    OpenShift VMs to use.
    - See `openstack flavor list` for the list of available flavors.
    - See `openstack flavor list` for the list of available flavors.
-5. Set the `openstack_dns_nameservers` to the list of the IP addresses
+5. Set the `openshift_openstack_dns_nameservers` to the list of the IP addresses
    of the DNS servers used for the **private** address resolution.
    of the DNS servers used for the **private** address resolution.
 
 
 **NOTE ON DNS**: at minimum, the OpenShift nodes need to be able to access each
 **NOTE ON DNS**: at minimum, the OpenShift nodes need to be able to access each
 other by their hostname.  OpenStack doesn't provide this by default, so you
 other by their hostname.  OpenStack doesn't provide this by default, so you
 need to provide a DNS server. Put the address of that DNS server in
 need to provide a DNS server. Put the address of that DNS server in
-`openstack_dns_nameservers` variable.
+`openshift_openstack_dns_nameservers` variable.
 
 
 
 
 
 

+ 40 - 40
playbooks/openstack/advanced-configuration.md

@@ -182,17 +182,17 @@ So the provisioned cluster nodes will start using those natively as
 default nameservers. Technically, this allows to deploy OpenShift clusters
 default nameservers. Technically, this allows to deploy OpenShift clusters
 without dnsmasq proxies.
 without dnsmasq proxies.
 
 
-The `env_id` and `public_dns_domain` will form the cluster's DNS domain all
+The `openshift_openstack_clusterid` and `openshift_openstack_public_dns_domain` will form the cluster's DNS domain all
 your servers will be under. With the default values, this will be
 your servers will be under. With the default values, this will be
 `openshift.example.com`. For workloads, the default subdomain is 'apps'.
 `openshift.example.com`. For workloads, the default subdomain is 'apps'.
-That sudomain can be set as well by the `openshift_app_domain` variable in
+That sudomain can be set as well by the `openshift_openstack_app_subdomain` variable in
 the inventory.
 the inventory.
 
 
 The `openstack_<role name>_hostname` is a set of variables used for customising
 The `openstack_<role name>_hostname` is a set of variables used for customising
 hostnames of servers with a given role. When such a variable stays commented,
 hostnames of servers with a given role. When such a variable stays commented,
 default hostname (usually the role name) is used.
 default hostname (usually the role name) is used.
 
 
-The `openstack_dns_nameservers` is a list of DNS servers accessible from all
+The `openshift_openstack_dns_nameservers` is a list of DNS servers accessible from all
 the created Nova servers. These will provide the internal name resolution for
 the created Nova servers. These will provide the internal name resolution for
 your OpenShift nodes (as well as upstream name resolution for installing
 your OpenShift nodes (as well as upstream name resolution for installing
 packages, etc.).
 packages, etc.).
@@ -204,10 +204,10 @@ daemon that in turn proxies DNS requests to the authoritative DNS server.
 When Network Manager is enabled for provisioned cluster nodes, which is
 When Network Manager is enabled for provisioned cluster nodes, which is
 normally the case, you should not change the defaults and always deploy dnsmasq.
 normally the case, you should not change the defaults and always deploy dnsmasq.
 
 
-`external_nsupdate_keys` describes an external authoritative DNS server(s)
+`openshift_openstack_external_nsupdate_keys` describes an external authoritative DNS server(s)
 processing dynamic records updates in the public and private cluster views:
 processing dynamic records updates in the public and private cluster views:
 
 
-    external_nsupdate_keys:
+    openshift_openstack_external_nsupdate_keys:
       public:
       public:
         key_secret: <some nsupdate key>
         key_secret: <some nsupdate key>
         key_algorithm: 'hmac-md5'
         key_algorithm: 'hmac-md5'
@@ -227,7 +227,7 @@ another external DNS server.
 Another example defines an external DNS server for the public view
 Another example defines an external DNS server for the public view
 additionally to the in-stack DNS server used for the private view only:
 additionally to the in-stack DNS server used for the private view only:
 
 
-    external_nsupdate_keys:
+    openshift_openstack_external_nsupdate_keys:
       public:
       public:
         key_secret: <some nsupdate key>
         key_secret: <some nsupdate key>
         key_algorithm: 'hmac-sha256'
         key_algorithm: 'hmac-sha256'
@@ -264,51 +264,51 @@ step for flannel and docker iptables configuration:
 
 
 ## Other configuration variables
 ## Other configuration variables
 
 
-`openstack_keypair_name` is a Nova keypair - you can see your
+`openshift_openstack_keypair_name` is a Nova keypair - you can see your
 keypairs with `openstack keypair list`. It must correspond to the
 keypairs with `openstack keypair list`. It must correspond to the
 private SSH key Ansible will use to log into the created VMs. This is
 private SSH key Ansible will use to log into the created VMs. This is
 `~/.ssh/id_rsa` by default, but you can use a different key by passing
 `~/.ssh/id_rsa` by default, but you can use a different key by passing
 `--private-key` to `ansible-playbook`.
 `--private-key` to `ansible-playbook`.
 
 
-`openstack_default_image_name` is the default name of the Glance image the
+`openshift_openstack_default_image_name` is the default name of the Glance image the
 servers will use. You can see your images with `openstack image list`.
 servers will use. You can see your images with `openstack image list`.
 In order to set a different image for a role, uncomment the line with the
 In order to set a different image for a role, uncomment the line with the
-corresponding variable (e.g. `openstack_lb_image_name` for load balancer) and
-set its value to another available image name. `openstack_default_image_name`
+corresponding variable (e.g. `openshift_openstack_lb_image_name` for load balancer) and
+set its value to another available image name. `openshift_openstack_default_image_name`
 must stay defined as it is used as a default value for the rest of the roles.
 must stay defined as it is used as a default value for the rest of the roles.
 
 
-`openstack_default_flavor` is the default Nova flavor the servers will use.
+`openshift_openstack_default_flavor` is the default Nova flavor the servers will use.
 You can see your flavors with `openstack flavor list`.
 You can see your flavors with `openstack flavor list`.
 In order to set a different flavor for a role, uncomment the line with the
 In order to set a different flavor for a role, uncomment the line with the
-corresponding variable (e.g. `openstack_lb_flavor` for load balancer) and
-set its value to another available flavor. `openstack_default_flavor` must
+corresponding variable (e.g. `openshift_openstack_lb_flavor` for load balancer) and
+set its value to another available flavor. `openshift_openstack_default_flavor` must
 stay defined as it is used as a default value for the rest of the roles.
 stay defined as it is used as a default value for the rest of the roles.
 
 
-`openstack_external_network_name` is the name of the Neutron network
+`openshift_openstack_external_network_name` is the name of the Neutron network
 providing external connectivity. It is often called `public`,
 providing external connectivity. It is often called `public`,
 `external` or `ext-net`. You can see your networks with `openstack
 `external` or `ext-net`. You can see your networks with `openstack
 network list`.
 network list`.
 
 
-`openstack_private_network_name` is the name of the private Neutron network
+`openshift_openstack_private_network_name` is the name of the private Neutron network
 providing admin/control access for ansible. It can be merged with other
 providing admin/control access for ansible. It can be merged with other
 cluster networks, there are no special requirements for networking.
 cluster networks, there are no special requirements for networking.
 
 
-The `openstack_num_masters`, `openstack_num_infra` and
-`openstack_num_nodes` values specify the number of Master, Infra and
+The `openshift_openstack_num_masters`, `openshift_openstack_num_infra` and
+`openshift_openstack_num_nodes` values specify the number of Master, Infra and
 App nodes to create.
 App nodes to create.
 
 
-The `openshift_cluster_node_labels` defines custom labels for your openshift
+The `openshift_openstack_cluster_node_labels` defines custom labels for your openshift
 cluster node groups. It currently supports app and infra node groups.
 cluster node groups. It currently supports app and infra node groups.
 The default value of this variable sets `region: primary` to app nodes and
 The default value of this variable sets `region: primary` to app nodes and
 `region: infra` to infra nodes.
 `region: infra` to infra nodes.
 An example of setting a customised label:
 An example of setting a customised label:
 ```
 ```
-openshift_cluster_node_labels:
+openshift_openstack_cluster_node_labels:
   app:
   app:
     mylabel: myvalue
     mylabel: myvalue
 ```
 ```
 
 
-The `openstack_nodes_to_remove` allows you to specify the numerical indexes
+The `openshift_openstack_nodes_to_remove` allows you to specify the numerical indexes
 of App nodes that should be removed; for example, ['0', '2'],
 of App nodes that should be removed; for example, ['0', '2'],
 
 
 The `docker_volume_size` is the default Docker volume size the servers will use.
 The `docker_volume_size` is the default Docker volume size the servers will use.
@@ -318,15 +318,15 @@ for master) and change its value. `docker_volume_size` must stay defined as it i
 used as a default value for some of the servers (master, infra, app node).
 used as a default value for some of the servers (master, infra, app node).
 The rest of the roles (etcd, load balancer, dns) have their defaults hard-coded.
 The rest of the roles (etcd, load balancer, dns) have their defaults hard-coded.
 
 
-**Note**: If the `ephemeral_volumes` is set to `true`, the `*_volume_size` variables
+**Note**: If the `openshift_openstack_ephemeral_volumes` is set to `true`, the `*_volume_size` variables
 will be ignored and the deployment will not create any cinder volumes.
 will be ignored and the deployment will not create any cinder volumes.
 
 
-The `openstack_flat_secgrp`, controls Neutron security groups creation for Heat
+The `openshift_openstack_flat_secgrp`, controls Neutron security groups creation for Heat
 stacks. Set it to true, if you experience issues with sec group rules
 stacks. Set it to true, if you experience issues with sec group rules
 quotas. It trades security for number of rules, by sharing the same set
 quotas. It trades security for number of rules, by sharing the same set
 of firewall rules for master, node, etcd and infra nodes.
 of firewall rules for master, node, etcd and infra nodes.
 
 
-The `required_packages` variable also provides a list of the additional
+The `openshift_openstack_required_packages` variable also provides a list of the additional
 prerequisite packages to be installed before to deploy an OpenShift cluster.
 prerequisite packages to be installed before to deploy an OpenShift cluster.
 Those are ignored though, if the `manage_packages: False`.
 Those are ignored though, if the `manage_packages: False`.
 
 
@@ -358,11 +358,11 @@ floating IP addresses to each node. If you have a provider network set up, this
 is all unnecessary as you can just access servers that are placed in the
 is all unnecessary as you can just access servers that are placed in the
 provider network directly.
 provider network directly.
 
 
-To use a provider network, set its name in `openstack_provider_network_name` in
+To use a provider network, set its name in `openshift_openstack_provider_network_name` in
 `inventory/group_vars/all.yml`.
 `inventory/group_vars/all.yml`.
 
 
-If you set the provider network name, the `openstack_external_network_name` and
-`openstack_private_network_name` fields will be ignored.
+If you set the provider network name, the `openshift_openstack_external_network_name` and
+`openshift_openstack_private_network_name` fields will be ignored.
 
 
 **NOTE**: this will not update the nodes' DNS, so running openshift-ansible
 **NOTE**: this will not update the nodes' DNS, so running openshift-ansible
 right after provisioning will fail (unless you're using an external DNS server
 right after provisioning will fail (unless you're using an external DNS server
@@ -373,7 +373,7 @@ resolve each other by name.
 
 
 Configure required `*_ingress_cidr` variables to restrict public access
 Configure required `*_ingress_cidr` variables to restrict public access
 to provisioned servers from your laptop (a /32 notation should be used)
 to provisioned servers from your laptop (a /32 notation should be used)
-or your trusted network. The most important is the `node_ingress_cidr`
+or your trusted network. The most important is the `openshift_openstack_node_ingress_cidr`
 that restricts public access to the deployed DNS server and cluster
 that restricts public access to the deployed DNS server and cluster
 nodes' ephemeral ports range.
 nodes' ephemeral ports range.
 
 
@@ -388,7 +388,7 @@ implications though, and is not recommended for production deployments.
 
 
 ### DNS servers security options
 ### DNS servers security options
 
 
-Aside from `node_ingress_cidr` restricting public access to in-stack DNS
+Aside from `openshift_openstack_node_ingress_cidr` restricting public access to in-stack DNS
 servers, there are following (bind/named specific) DNS security
 servers, there are following (bind/named specific) DNS security
 options available:
 options available:
 
 
@@ -435,8 +435,8 @@ it up as the OpenShift hosted registry.
 To do that you need specify the desired Cinder volume name and size in
 To do that you need specify the desired Cinder volume name and size in
 Gigabytes in `inventory/group_vars/all.yml`:
 Gigabytes in `inventory/group_vars/all.yml`:
 
 
-    cinder_hosted_registry_name: cinder-registry
-    cinder_hosted_registry_size_gb: 10
+    openshift_openstack_cinder_hosted_registry_name: cinder-registry
+    openshift_openstack_cinder_hosted_registry_size_gb: 10
 
 
 With this, the playbooks will create the volume and set up its
 With this, the playbooks will create the volume and set up its
 filesystem. If there is an existing volume of the same name, we will
 filesystem. If there is an existing volume of the same name, we will
@@ -483,8 +483,8 @@ the volume.
 If you're using the dynamic inventory, you must uncomment these two values as
 If you're using the dynamic inventory, you must uncomment these two values as
 well:
 well:
 
 
-    #openshift_hosted_registry_storage_openstack_volumeID: "{{ lookup('os_cinder', cinder_hosted_registry_name).id }}"
-    #openshift_hosted_registry_storage_volume_size: "{{ cinder_hosted_registry_size_gb }}Gi"
+    #openshift_hosted_registry_storage_openstack_volumeID: "{{ lookup('os_cinder', openshift_openstack_cinder_hosted_registry_name).id }}"
+    #openshift_hosted_registry_storage_volume_size: "{{ openshift_openstack_cinder_hosted_registry_size_gb }}Gi"
 
 
 But note that they use the `os_cinder` lookup plugin we provide, so you must
 But note that they use the `os_cinder` lookup plugin we provide, so you must
 tell Ansible where to find it either in `ansible.cfg` (the one we provide is
 tell Ansible where to find it either in `ansible.cfg` (the one we provide is
@@ -528,7 +528,7 @@ the **UUID** of the Cinder volume, *not its name*.
 We can do formate the volume for you if you ask for it in
 We can do formate the volume for you if you ask for it in
 `inventory/group_vars/all.yml`:
 `inventory/group_vars/all.yml`:
 
 
-    prepare_and_format_registry_volume: true
+    openshift_openstack_prepare_and_format_registry_volume: true
 
 
 **NOTE:** doing so **will destroy any data that's currently on the volume**!
 **NOTE:** doing so **will destroy any data that's currently on the volume**!
 
 
@@ -544,16 +544,16 @@ You can also run the registry setup playbook directly:
 
 
 Example inventory variables:
 Example inventory variables:
 
 
-    openstack_use_bastion: true
-    bastion_ingress_cidr: "{{openstack_subnet_prefix}}.0/24"
+    openshift_openstack_use_bastion: true
+    openshift_openstack_bastion_ingress_cidr: "{{openshift_openstack_subnet_prefix}}.0/24"
     openstack_private_ssh_key: ~/.ssh/id_rsa
     openstack_private_ssh_key: ~/.ssh/id_rsa
     openstack_inventory: static
     openstack_inventory: static
     openstack_inventory_path: ../../../../inventory
     openstack_inventory_path: ../../../../inventory
     openstack_ssh_config_path: /tmp/ssh.config.openshift.ansible.openshift.example.com
     openstack_ssh_config_path: /tmp/ssh.config.openshift.ansible.openshift.example.com
 
 
-The `openstack_subnet_prefix` is the openstack private network for your cluster.
-And the `bastion_ingress_cidr` defines accepted range for SSH connections to nodes
-additionally to the `ssh_ingress_cidr`` (see the security notes above).
+The `openshift_openstack_subnet_prefix` is the openstack private network for your cluster.
+And the `openshift_openstack_bastion_ingress_cidr` defines accepted range for SSH connections to nodes
+additionally to the `openshift_openstack_ssh_ingress_cidr`` (see the security notes above).
 
 
 The SSH config will be stored on the ansible control node by the
 The SSH config will be stored on the ansible control node by the
 gitven path. Ansible uses it automatically. To access the cluster nodes with
 gitven path. Ansible uses it automatically. To access the cluster nodes with
@@ -738,7 +738,7 @@ OpenShift UI may be accessed via the 1st master node FQDN, port 8443.
 When using a bastion, you may want to make an SSH tunnel from your control node
 When using a bastion, you may want to make an SSH tunnel from your control node
 to access UI on the `https://localhost:8443`, with this inventory variable:
 to access UI on the `https://localhost:8443`, with this inventory variable:
 
 
-   openshift_ui_ssh_tunnel: True
+   openshift_openstack_ui_ssh_tunnel: True
 
 
 Note, this requires sudo rights on the ansible control node and an absolute path
 Note, this requires sudo rights on the ansible control node and an absolute path
 for the `openstack_private_ssh_key`. You should also update the control node's
 for the `openstack_private_ssh_key`. You should also update the control node's
@@ -769,4 +769,4 @@ Usage:
 ansible-playbook -i <path to inventory> openshift-ansible-contrib/playbooks/provisioning/openstack/scale-up.yaml` [-e increment_by=<number>] [-e openshift_ansible_dir=<path to openshift-ansible>]
 ansible-playbook -i <path to inventory> openshift-ansible-contrib/playbooks/provisioning/openstack/scale-up.yaml` [-e increment_by=<number>] [-e openshift_ansible_dir=<path to openshift-ansible>]
 ```
 ```
 
 
-Note: This playbook works only without a bastion node (`openstack_use_bastion: False`).
+Note: This playbook works only without a bastion node (`openshift_openstack_use_bastion: False`).

+ 2 - 2
playbooks/openstack/openshift-cluster/provision.yml

@@ -42,8 +42,8 @@
       name: openshift_openstack
       name: openshift_openstack
       tasks_from: populate-dns.yml
       tasks_from: populate-dns.yml
     when:
     when:
-    - external_nsupdate_keys is defined
-    - external_nsupdate_keys.private is defined or external_nsupdate_keys.public is defined
+    - openshift_openstack_external_nsupdate_keys is defined
+    - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
 
 
 - name: Prepare the Nodes in the cluster for installation
 - name: Prepare the Nodes in the cluster for installation
   hosts: oo_all_hosts
   hosts: oo_all_hosts

+ 5 - 5
playbooks/openstack/sample-inventory/group_vars/OSEv3.yml

@@ -2,10 +2,10 @@
 openshift_deployment_type: origin
 openshift_deployment_type: origin
 #openshift_deployment_type: openshift-enterprise
 #openshift_deployment_type: openshift-enterprise
 #openshift_release: v3.5
 #openshift_release: v3.5
-openshift_master_default_subdomain: "apps.{{ env_id }}.{{ public_dns_domain }}"
+openshift_master_default_subdomain: "apps.{{ openshift_openstack_clusterid }}.{{ openshift_openstack_public_dns_domain }}"
 
 
 openshift_master_cluster_method: native
 openshift_master_cluster_method: native
-openshift_master_cluster_hostname: "console.{{ env_id }}.{{ public_dns_domain }}"
+openshift_master_cluster_hostname: "console.{{ openshift_openstack_clusterid }}.{{ openshift_openstack_public_dns_domain }}"
 openshift_master_cluster_public_hostname: "{{ openshift_master_cluster_hostname }}"
 openshift_master_cluster_public_hostname: "{{ openshift_master_cluster_hostname }}"
 
 
 osm_default_node_selector: 'region=primary'
 osm_default_node_selector: 'region=primary'
@@ -29,10 +29,10 @@ openshift_hosted_registry_wait: True
 
 
 ## NOTE(shadower): This won't work until the openshift-ansible issue #5657 is fixed:
 ## NOTE(shadower): This won't work until the openshift-ansible issue #5657 is fixed:
 ## https://github.com/openshift/openshift-ansible/issues/5657
 ## https://github.com/openshift/openshift-ansible/issues/5657
-## If you're using the `cinder_hosted_registry_name` option from
+## If you're using the `openshift_openstack_cinder_hosted_registry_name` option from
 ## `all.yml`, uncomment these lines:
 ## `all.yml`, uncomment these lines:
-#openshift_hosted_registry_storage_openstack_volumeID: "{{ lookup('os_cinder', cinder_hosted_registry_name).id }}"
-#openshift_hosted_registry_storage_volume_size: "{{ cinder_hosted_registry_size_gb }}Gi"
+#openshift_hosted_registry_storage_openstack_volumeID: "{{ lookup('os_cinder', openshift_openstack_cinder_hosted_registry_name).id }}"
+#openshift_hosted_registry_storage_volume_size: "{{ openshift_openstack_cinder_hosted_registry_size_gb }}Gi"
 
 
 ## If you're using a Cinder volume you've set up yourself, uncomment these lines:
 ## If you're using a Cinder volume you've set up yourself, uncomment these lines:
 #openshift_hosted_registry_storage_openstack_volumeID: e0ba2d73-d2f9-4514-a3b2-a0ced507fa05
 #openshift_hosted_registry_storage_openstack_volumeID: e0ba2d73-d2f9-4514-a3b2-a0ced507fa05

+ 51 - 51
playbooks/openstack/sample-inventory/group_vars/all.yml

@@ -1,59 +1,59 @@
 ---
 ---
-env_id: "openshift"
-public_dns_domain: "example.com"
-openstack_dns_nameservers: []
+openshift_openstack_clusterid: "openshift"
+openshift_openstack_public_dns_domain: "example.com"
+openshift_openstack_dns_nameservers: []
 
 
 # # Used Hostnames
 # # Used Hostnames
 # # - set custom hostnames for roles by uncommenting corresponding lines
 # # - set custom hostnames for roles by uncommenting corresponding lines
-#openstack_master_hostname: "master"
-#openstack_infra_hostname: "infra-node"
-#openstack_node_hostname: "app-node"
-#openstack_lb_hostname: "lb"
-#openstack_etcd_hostname: "etcd"
-#openstack_dns_hostname: "dns"
-
-openstack_keypair_name: "openshift"
-openstack_external_network_name: "public"
-#openstack_private_network_name:  "openshift-ansible-{{ stack_name }}-net"
+#openshift_openstack_master_hostname: "master"
+#openshift_openstack_infra_hostname: "infra-node"
+#openshift_openstack_node_hostname: "app-node"
+#openshift_openstack_lb_hostname: "lb"
+#openshift_openstack_etcd_hostname: "etcd"
+#openshift_openstack_dns_hostname: "dns"
+
+openshift_openstack_keypair_name: "openshift"
+openshift_openstack_external_network_name: "public"
+#openshift_openstack_private_network_name:  "openshift-ansible-{{ openshift_openstack_stack_name }}-net"
 # # A dedicated Neutron network name for containers data network
 # # A dedicated Neutron network name for containers data network
-# # Configures the data network to be separated from openstack_private_network_name
+# # Configures the data network to be separated from openshift_openstack_private_network_name
 # # NOTE: this is only supported with Flannel SDN yet
 # # NOTE: this is only supported with Flannel SDN yet
-#openstack_private_data_network_name: "openshift-ansible-{{ stack_name }}-data-net"
+#openstack_private_data_network_name: "openshift-ansible-{{ openshift_openstack_stack_name }}-data-net"
 
 
 ## If you want to use a provider network, set its name here.
 ## If you want to use a provider network, set its name here.
-## NOTE: the `openstack_external_network_name` and
-## `openstack_private_network_name` options will be ignored when using a
+## NOTE: the `openshift_openstack_external_network_name` and
+## `openshift_openstack_private_network_name` options will be ignored when using a
 ## provider network.
 ## provider network.
-#openstack_provider_network_name: "provider"
+#openshift_openstack_provider_network_name: "provider"
 
 
 # # Used Images
 # # Used Images
 # # - set specific images for roles by uncommenting corresponding lines
 # # - set specific images for roles by uncommenting corresponding lines
-# # - note: do not remove openstack_default_image_name definition
-#openstack_master_image_name: "centos7"
-#openstack_infra_image_name: "centos7"
-#openstack_node_image_name: "centos7"
-#openstack_lb_image_name: "centos7"
-#openstack_etcd_image_name: "centos7"
-#openstack_dns_image_name: "centos7"
-openstack_default_image_name: "centos7"
-
-openstack_num_masters: 1
-openstack_num_infra: 1
-openstack_num_nodes: 2
+# # - note: do not remove openshift_openstack_default_image_name definition
+#openshift_openstack_master_image_name: "centos7"
+#openshift_openstack_infra_image_name: "centos7"
+#openshift_openstack_node_image_name: "centos7"
+#openshift_openstack_lb_image_name: "centos7"
+#openshift_openstack_etcd_image_name: "centos7"
+#openshift_openstack_dns_image_name: "centos7"
+openshift_openstack_default_image_name: "centos7"
+
+openshift_openstack_num_masters: 1
+openshift_openstack_num_infra: 1
+openshift_openstack_num_nodes: 2
 
 
 # # Used Flavors
 # # Used Flavors
 # # - set specific flavors for roles by uncommenting corresponding lines
 # # - set specific flavors for roles by uncommenting corresponding lines
-# # - note: do note remove openstack_default_flavor definition
-#openstack_master_flavor: "m1.medium"
-#openstack_infra_flavor: "m1.medium"
-#openstack_node_flavor: "m1.medium"
-#openstack_lb_flavor: "m1.medium"
-#openstack_etcd_flavor: "m1.medium"
-#openstack_dns_flavor: "m1.medium"
-openstack_default_flavor: "m1.medium"
+# # - note: do note remove openshift_openstack_default_flavor definition
+#openshift_openstack_master_flavor: "m1.medium"
+#openshift_openstack_infra_flavor: "m1.medium"
+#openshift_openstack_node_flavor: "m1.medium"
+#openshift_openstack_lb_flavor: "m1.medium"
+#openshift_openstack_etcd_flavor: "m1.medium"
+#openshift_openstack_dns_flavor: "m1.medium"
+openshift_openstack_default_flavor: "m1.medium"
 
 
 # # Numerical index of nodes to remove
 # # Numerical index of nodes to remove
-# openstack_nodes_to_remove: []
+# openshift_openstack_nodes_to_remove: []
 
 
 # # Docker volume size
 # # Docker volume size
 # # - set specific volume size for roles by uncommenting corresponding lines
 # # - set specific volume size for roles by uncommenting corresponding lines
@@ -69,22 +69,22 @@ docker_volume_size: "15"
 ## Specify server group policies for master and infra nodes. Nova must be configured to
 ## Specify server group policies for master and infra nodes. Nova must be configured to
 ## enable these policies. 'anti-affinity' will ensure that each VM is launched on a
 ## enable these policies. 'anti-affinity' will ensure that each VM is launched on a
 ## different physical host.
 ## different physical host.
-#openstack_master_server_group_policies: [anti-affinity]
-#openstack_infra_server_group_policies: [anti-affinity]
+#openshift_openstack_master_server_group_policies: [anti-affinity]
+#openshift_openstack_infra_server_group_policies: [anti-affinity]
 
 
 ## Create a Cinder volume and use it for the OpenShift registry.
 ## Create a Cinder volume and use it for the OpenShift registry.
 ## NOTE: the openstack credentials and hosted registry options must be set in OSEv3.yml!
 ## NOTE: the openstack credentials and hosted registry options must be set in OSEv3.yml!
-#cinder_hosted_registry_name: cinder-registry
-#cinder_hosted_registry_size_gb: 10
+#openshift_openstack_cinder_hosted_registry_name: cinder-registry
+#openshift_openstack_cinder_hosted_registry_size_gb: 10
 
 
 ## Set up a filesystem on the cinder volume specified in `OSEv3.yaml`.
 ## Set up a filesystem on the cinder volume specified in `OSEv3.yaml`.
 ## You need to specify the file system and volume ID in OSEv3 via
 ## You need to specify the file system and volume ID in OSEv3 via
 ## `openshift_hosted_registry_storage_openstack_filesystem` and
 ## `openshift_hosted_registry_storage_openstack_filesystem` and
 ## `openshift_hosted_registry_storage_openstack_volumeID`.
 ## `openshift_hosted_registry_storage_openstack_volumeID`.
 ## WARNING: This will delete any data on the volume!
 ## WARNING: This will delete any data on the volume!
-#prepare_and_format_registry_volume: False
+#openshift_openstack_prepare_and_format_registry_volume: False
 
 
-openstack_subnet_prefix: "192.168.99"
+openshift_openstack_subnet_prefix: "192.168.99"
 
 
 ## Red Hat subscription defaults to false which means we will not attempt to
 ## Red Hat subscription defaults to false which means we will not attempt to
 ## subscribe the nodes
 ## subscribe the nodes
@@ -110,8 +110,8 @@ openstack_subnet_prefix: "192.168.99"
 
 
 
 
 # # Roll-your-own DNS
 # # Roll-your-own DNS
-#openstack_num_dns: 0
-#external_nsupdate_keys:
+#openshift_openstack_num_dns: 0
+#openshift_openstack_external_nsupdate_keys:
 #  public:
 #  public:
 #    key_secret: 'SKqKNdpfk7llKxZ57bbxUnUDobaaJp9t8CjXLJPl+fRI5mPcSBuxTAyvJPa6Y9R7vUg9DwCy/6WTpgLNqnV4Hg=='
 #    key_secret: 'SKqKNdpfk7llKxZ57bbxUnUDobaaJp9t8CjXLJPl+fRI5mPcSBuxTAyvJPa6Y9R7vUg9DwCy/6WTpgLNqnV4Hg=='
 #    key_algorithm: 'hmac-md5'
 #    key_algorithm: 'hmac-md5'
@@ -131,16 +131,16 @@ openstack_subnet_prefix: "192.168.99"
 ansible_user: openshift
 ansible_user: openshift
 
 
 # # Use a single security group for a cluster (default: false)
 # # Use a single security group for a cluster (default: false)
-#openstack_flat_secgrp: false
+#openshift_openstack_flat_secgrp: false
 
 
 # If you want to use the VM storage instead of Cinder volumes, set this to `true`.
 # If you want to use the VM storage instead of Cinder volumes, set this to `true`.
 # NOTE: this is for testing only! Your data will be gone once the VM disappears!
 # NOTE: this is for testing only! Your data will be gone once the VM disappears!
-# ephemeral_volumes: false
+# openshift_openstack_ephemeral_volumes: false
 
 
 # # OpenShift node labels
 # # OpenShift node labels
 # # - in order to customise node labels for app and/or infra group, set the
 # # - in order to customise node labels for app and/or infra group, set the
-# #   openshift_cluster_node_labels variable
-#openshift_cluster_node_labels:
+# #   openshift_openstack_cluster_node_labels variable
+#openshift_openstack_cluster_node_labels:
 #  app:
 #  app:
 #    region: primary
 #    region: primary
 #  infra:
 #  infra:

+ 67 - 65
roles/openshift_openstack/defaults/main.yml

@@ -1,28 +1,27 @@
 ---
 ---
-stack_state: 'present'
+openshift_openstack_stack_state: 'present'
 
 
-ssh_ingress_cidr: 0.0.0.0/0
-node_ingress_cidr: 0.0.0.0/0
-master_ingress_cidr: 0.0.0.0/0
-lb_ingress_cidr: 0.0.0.0/0
-bastion_ingress_cidr: 0.0.0.0/0
-openstack_num_etcd: 0
-openstack_num_masters: 1
-openstack_num_nodes: 1
-openstack_num_dns: 0
-openstack_num_infra: 1
-openstack_dns_nameservers: []
-openstack_nodes_to_remove: []
+openshift_openstack_ssh_ingress_cidr: 0.0.0.0/0
+openshift_openstack_node_ingress_cidr: 0.0.0.0/0
+openshift_openstack_lb_ingress_cidr: 0.0.0.0/0
+openshift_openstack_bastion_ingress_cidr: 0.0.0.0/0
+openshift_openstack_num_etcd: 0
+openshift_openstack_num_masters: 1
+openshift_openstack_num_nodes: 1
+openshift_openstack_num_dns: 0
+openshift_openstack_num_infra: 1
+openshift_openstack_dns_nameservers: []
+openshift_openstack_nodes_to_remove: []
 
 
 
 
-openshift_cluster_node_labels:
+openshift_openstack_cluster_node_labels:
   app:
   app:
     region: primary
     region: primary
   infra:
   infra:
     region: infra
     region: infra
 
 
-install_debug_packages: false
-required_packages:
+openshift_openstack_install_debug_packages: false
+openshift_openstack_required_packages:
   - docker
   - docker
   - NetworkManager
   - NetworkManager
   - wget
   - wget
@@ -30,66 +29,69 @@ required_packages:
   - net-tools
   - net-tools
   - bind-utils
   - bind-utils
   - bridge-utils
   - bridge-utils
-debug_packages:
+openshift_openstack_debug_packages:
   - bash-completion
   - bash-completion
   - vim-enhanced
   - vim-enhanced
 
 
 # container-storage-setup
 # container-storage-setup
-docker_dev: "/dev/sdb"
-docker_vg: "docker-vol"
-docker_data_size: "95%VG"
-docker_dm_basesize: "3G"
-container_root_lv_name: "dockerlv"
-container_root_lv_mount_path: "/var/lib/docker"
+openshift_openstack_container_storage_setup:
+  docker_dev: "/dev/sdb"
+  docker_vg: "docker-vol"
+  docker_data_size: "95%VG"
+  docker_dm_basesize: "3G"
+  container_root_lv_name: "dockerlv"
+  container_root_lv_mount_path: "/var/lib/docker"
 
 
 
 
 # populate-dns
 # populate-dns
-dns_records_rm: []
-dns_records_add: []
-external_nsupdate_keys: {}
+openshift_openstack_dns_records_add: []
+openshift_openstack_external_nsupdate_keys: {}
 
 
-full_dns_domain: "{{ (env_id|trim == '') | ternary(public_dns_domain, env_id + '.' + public_dns_domain) }}"
-openshift_app_domain: "apps"
+openshift_openstack_full_dns_domain: "{{ (openshift_openstack_clusterid|trim == '') | ternary(openshift_openstack_public_dns_domain, openshift_openstack_clusterid + '.' + openshift_openstack_public_dns_domain) }}"
+openshift_openstack_app_subdomain: "apps"
 
 
 
 
 
 
 # heat vars
 # heat vars
-stack_name: "{{ env_id }}.{{ public_dns_domain }}"
-openstack_subnet_prefix: "192.168.99"
-openstack_master_hostname: master
-openstack_infra_hostname: infra-node
-openstack_node_hostname: app-node
-openstack_lb_hostname: lb
-openstack_etcd_hostname: etcd
-openstack_dns_hostname: dns
-openstack_keypair_name: openshift
-openstack_lb_flavor: "{{ openstack_default_flavor }}"
-openstack_etcd_flavor: "{{ openstack_default_flavor }}"
-openstack_master_flavor: "{{ openstack_default_flavor }}"
-openstack_node_flavor: "{{ openstack_default_flavor }}"
-openstack_infra_flavor: "{{ openstack_default_flavor }}"
-openstack_dns_flavor: "{{ openstack_default_flavor }}"
-openstack_master_image: "{{ openstack_default_image_name }}"
-openstack_infra_image: "{{ openstack_default_image_name }}"
-openstack_node_image: "{{ openstack_default_image_name }}"
-openstack_lb_image: "{{ openstack_default_image_name }}"
-openstack_etcd_image: "{{ openstack_default_image_name }}"
-openstack_dns_image: "{{ openstack_default_image_name }}"
-openstack_provider_network_name: null
-openstack_external_network_name: null
-openstack_private_network: >-
-  {% if openstack_provider_network_name | default(None) -%}
-  {{ openstack_provider_network_name }}
+openshift_openstack_clusterid: openshift
+openshift_openstack_stack_name: "{{ openshift_openstack_clusterid }}.{{ openshift_openstack_public_dns_domain }}"
+openshift_openstack_subnet_prefix: "192.168.99"
+openshift_openstack_master_hostname: master
+openshift_openstack_infra_hostname: infra-node
+openshift_openstack_node_hostname: app-node
+openshift_openstack_lb_hostname: lb
+openshift_openstack_etcd_hostname: etcd
+openshift_openstack_dns_hostname: dns
+openshift_openstack_keypair_name: openshift
+openshift_openstack_lb_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_etcd_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_master_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_node_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_infra_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_dns_flavor: "{{ openshift_openstack_default_flavor }}"
+openshift_openstack_master_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_infra_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_node_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_lb_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_etcd_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_dns_image: "{{ openshift_openstack_default_image_name }}"
+openshift_openstack_provider_network_name: null
+openshift_openstack_external_network_name: null
+openshift_openstack_private_network: >-
+  {% if openshift_openstack_provider_network_name | default(None) -%}
+  {{ openshift_openstack_provider_network_name }}
   {%- else -%}
   {%- else -%}
-  {{ openstack_private_network_name | default ('openshift-ansible-' + stack_name + '-net') }}
+  {{ openshift_openstack_private_network_name | default ('openshift-ansible-' + openshift_openstack_stack_name + '-net') }}
   {%- endif -%}
   {%- endif -%}
-openstack_master_server_group_policies: []
-openstack_infra_server_group_policies: []
-openstack_master_volume_size: "{{ docker_volume_size }}"
-openstack_infra_volume_size: "{{ docker_volume_size }}"
-openstack_node_volume_size: "{{ docker_volume_size }}"
-openstack_etcd_volume_size: 2
-openstack_dns_volume_size: 1
-openstack_lb_volume_size: 5
-openstack_use_bastion: false
-openshift_ui_ssh_tunnel: false
+openshift_openstack_master_server_group_policies: []
+openshift_openstack_infra_server_group_policies: []
+openshift_openstack_docker_volume_size: 15
+openshift_openstack_master_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_infra_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_node_volume_size: "{{ openshift_openstack_docker_volume_size }}"
+openshift_openstack_etcd_volume_size: 2
+openshift_openstack_dns_volume_size: 1
+openshift_openstack_lb_volume_size: 5
+openshift_openstack_use_bastion: false
+openshift_openstack_ui_ssh_tunnel: false
+openshift_openstack_ephemeral_volumes: false

+ 20 - 20
roles/openshift_openstack/tasks/check-prerequisites.yml

@@ -50,24 +50,24 @@
 # Check Glance image
 # Check Glance image
 - name: Try to get image facts
 - name: Try to get image facts
   os_image_facts:
   os_image_facts:
-    image: "{{ openstack_default_image_name }}"
+    image: "{{ openshift_openstack_default_image_name }}"
   register: image_result
   register: image_result
 - name: Check that image is available
 - name: Check that image is available
   assert:
   assert:
     that: "image_result.ansible_facts.openstack_image"
     that: "image_result.ansible_facts.openstack_image"
-    msg: "Image {{ openstack_default_image_name }} is not available"
+    msg: "Image {{ openshift_openstack_default_image_name }} is not available"
 
 
 # Check network name
 # Check network name
 - name: Try to get network facts
 - name: Try to get network facts
   os_networks_facts:
   os_networks_facts:
-    name: "{{ openstack_external_network_name }}"
+    name: "{{ openshift_openstack_external_network_name }}"
   register: network_result
   register: network_result
-  when: not openstack_provider_network_name|default(None)
+  when: not openshift_openstack_provider_network_name|default(None)
 - name: Check that network is available
 - name: Check that network is available
   assert:
   assert:
     that: "network_result.ansible_facts.openstack_networks"
     that: "network_result.ansible_facts.openstack_networks"
-    msg: "Network {{ openstack_external_network_name }} is not available"
-  when: not openstack_provider_network_name|default(None)
+    msg: "Network {{ openshift_openstack_external_network_name }} is not available"
+  when: not openshift_openstack_provider_network_name|default(None)
 
 
 # Check keypair
 # Check keypair
 # TODO kpilatov: there is no Ansible module for getting OS keypairs
 # TODO kpilatov: there is no Ansible module for getting OS keypairs
@@ -76,30 +76,30 @@
 - name: Try to show keypair
 - name: Try to show keypair
   command: >
   command: >
            python -c 'import shade; cloud = shade.openstack_cloud();
            python -c 'import shade; cloud = shade.openstack_cloud();
-           exit(cloud.get_keypair("{{ openstack_keypair_name }}") is None)'
+           exit(cloud.get_keypair("{{ openshift_openstack_keypair_name }}") is None)'
   ignore_errors: yes
   ignore_errors: yes
   register: key_result
   register: key_result
 - name: Check that keypair is available
 - name: Check that keypair is available
   assert:
   assert:
     that: 'key_result.rc == 0'
     that: 'key_result.rc == 0'
-    msg: "Keypair {{ openstack_keypair_name }} is not available"
+    msg: "Keypair {{ openshift_openstack_keypair_name }} is not available"
 
 
 # Check that custom images are available
 # Check that custom images are available
 - include: custom_image_check.yaml
 - include: custom_image_check.yaml
   with_items:
   with_items:
-  - "{{ openstack_master_image }}"
-  - "{{ openstack_infra_image }}"
-  - "{{ openstack_node_image }}"
-  - "{{ openstack_lb_image }}"
-  - "{{ openstack_etcd_image }}"
-  - "{{ openstack_dns_image }}"
+  - "{{ openshift_openstack_master_image }}"
+  - "{{ openshift_openstack_infra_image }}"
+  - "{{ openshift_openstack_node_image }}"
+  - "{{ openshift_openstack_lb_image }}"
+  - "{{ openshift_openstack_etcd_image }}"
+  - "{{ openshift_openstack_dns_image }}"
 
 
 # Check that custom flavors are available
 # Check that custom flavors are available
 - include: custom_flavor_check.yaml
 - include: custom_flavor_check.yaml
   with_items:
   with_items:
-  - "{{ openstack_master_flavor }}"
-  - "{{ openstack_infra_flavor }}"
-  - "{{ openstack_node_flavor }}"
-  - "{{ openstack_lb_flavor }}"
-  - "{{ openstack_etcd_flavor }}"
-  - "{{ openstack_dns_flavor }}"
+  - "{{ openshift_openstack_master_flavor }}"
+  - "{{ openshift_openstack_infra_flavor }}"
+  - "{{ openshift_openstack_node_flavor }}"
+  - "{{ openshift_openstack_lb_flavor }}"
+  - "{{ openshift_openstack_etcd_flavor }}"
+  - "{{ openshift_openstack_dns_flavor }}"

+ 1 - 1
roles/openshift_openstack/tasks/hostname.yml

@@ -5,7 +5,7 @@
 
 
 - name: Setting FQDN Fact
 - name: Setting FQDN Fact
   set_fact:
   set_fact:
-    new_fqdn: "{{ new_hostname }}.{{ full_dns_domain }}"
+    new_fqdn: "{{ new_hostname }}.{{ openshift_openstack_full_dns_domain }}"
 
 
 - name: Setting hostname and DNS domain
 - name: Setting hostname and DNS domain
   hostname: name="{{ new_fqdn }}"
   hostname: name="{{ new_fqdn }}"

+ 1 - 1
roles/openshift_openstack/tasks/net_vars_check.yaml

@@ -3,7 +3,7 @@
   fail:
   fail:
     msg: "Flannel SDN requires a dedicated containers data network and can not work over a provider network"
     msg: "Flannel SDN requires a dedicated containers data network and can not work over a provider network"
   when:
   when:
-    - openstack_provider_network_name is defined
+    - openshift_openstack_provider_network_name is defined
     - openstack_private_data_network_name is defined
     - openstack_private_data_network_name is defined
 
 
 - name: Check the flannel network configuration
 - name: Check the flannel network configuration

+ 3 - 3
roles/openshift_openstack/tasks/node-packages.yml

@@ -5,11 +5,11 @@
   yum:
   yum:
     name: "{{ item }}"
     name: "{{ item }}"
     state: latest
     state: latest
-  with_items: "{{ required_packages }}"
+  with_items: "{{ openshift_openstack_required_packages }}"
 
 
 - name: Install debug packages (optional)
 - name: Install debug packages (optional)
   yum:
   yum:
     name: "{{ item }}"
     name: "{{ item }}"
     state: latest
     state: latest
-  with_items: "{{ debug_packages }}"
-  when: install_debug_packages|bool
+  with_items: "{{ openshift_openstack_debug_packages }}"
+  when: openshift_openstack_install_debug_packages|bool

+ 33 - 33
roles/openshift_openstack/tasks/populate-dns.yml

@@ -5,41 +5,41 @@
 
 
 - name: "Add wildcard records to the private A records for infrahosts"
 - name: "Add wildcard records to the private A records for infrahosts"
   set_fact:
   set_fact:
-    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['private_v4'] } ] }}"
+    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_openstack_app_subdomain, 'ip': hostvars[item]['private_v4'] } ] }}"
   with_items: "{{ groups['infra_hosts'] }}"
   with_items: "{{ groups['infra_hosts'] }}"
 
 
 - name: "Add public master cluster hostname records to the private A records (single master)"
 - name: "Add public master cluster hostname records to the private A records (single master)"
   set_fact:
   set_fact:
-    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].private_v4 } ] }}"
+    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].private_v4 } ] }}"
   when:
   when:
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
-    - openstack_num_masters == 1
+    - openshift_openstack_num_masters == 1
 
 
 - name: "Add public master cluster hostname records to the private A records (multi-master)"
 - name: "Add public master cluster hostname records to the private A records (multi-master)"
   set_fact:
   set_fact:
-    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].private_v4 } ] }}"
+    private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].private_v4 } ] }}"
   when:
   when:
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
-    - openstack_num_masters > 1
+    - openshift_openstack_num_masters > 1
 
 
 - name: "Set the private DNS server to use the external value (if provided)"
 - name: "Set the private DNS server to use the external value (if provided)"
   set_fact:
   set_fact:
-    nsupdate_server_private: "{{ external_nsupdate_keys['private']['server'] }}"
-    nsupdate_key_secret_private: "{{ external_nsupdate_keys['private']['key_secret'] }}"
-    nsupdate_key_algorithm_private: "{{ external_nsupdate_keys['private']['key_algorithm'] }}"
-    nsupdate_private_key_name: "{{ external_nsupdate_keys['private']['key_name']|default('private-' + full_dns_domain) }}"
+    nsupdate_server_private: "{{ openshift_openstack_external_nsupdate_keys['private']['server'] }}"
+    nsupdate_key_secret_private: "{{ openshift_openstack_external_nsupdate_keys['private']['key_secret'] }}"
+    nsupdate_key_algorithm_private: "{{ openshift_openstack_external_nsupdate_keys['private']['key_algorithm'] }}"
+    nsupdate_private_key_name: "{{ openshift_openstack_external_nsupdate_keys['private']['key_name']|default('private-' + openshift_openstack_full_dns_domain) }}"
   when:
   when:
-    - external_nsupdate_keys is defined
-    - external_nsupdate_keys['private'] is defined
+    - openshift_openstack_external_nsupdate_keys is defined
+    - openshift_openstack_external_nsupdate_keys['private'] is defined
 
 
 
 
 - name: "Generate the private Add section for DNS"
 - name: "Generate the private Add section for DNS"
   set_fact:
   set_fact:
     private_named_records:
     private_named_records:
       - view: "private"
       - view: "private"
-        zone: "{{ full_dns_domain }}"
+        zone: "{{ openshift_openstack_full_dns_domain }}"
         server: "{{ nsupdate_server_private }}"
         server: "{{ nsupdate_server_private }}"
-        key_name: "{{ nsupdate_private_key_name|default('private-' + full_dns_domain) }}"
+        key_name: "{{ nsupdate_private_key_name|default('private-' + openshift_openstack_full_dns_domain) }}"
         key_secret: "{{ nsupdate_key_secret_private }}"
         key_secret: "{{ nsupdate_key_secret_private }}"
         key_algorithm: "{{ nsupdate_key_algorithm_private | lower }}"
         key_algorithm: "{{ nsupdate_key_algorithm_private | lower }}"
         entries: "{{ private_records }}"
         entries: "{{ private_records }}"
@@ -52,58 +52,58 @@
 
 
 - name: "Add wildcard records to the public A records"
 - name: "Add wildcard records to the public A records"
   set_fact:
   set_fact:
-    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['public_v4'] } ] }}"
+    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_openstack_app_subdomain, 'ip': hostvars[item]['public_v4'] } ] }}"
   with_items: "{{ groups['infra_hosts'] }}"
   with_items: "{{ groups['infra_hosts'] }}"
   when: hostvars[item]['public_v4'] is defined
   when: hostvars[item]['public_v4'] is defined
 
 
 - name: "Add public master cluster hostname records to the public A records (single master)"
 - name: "Add public master cluster hostname records to the public A records (single master)"
   set_fact:
   set_fact:
-    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].public_v4 } ] }}"
+    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].public_v4 } ] }}"
   when:
   when:
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
-    - openstack_num_masters == 1
-    - not openstack_use_bastion|bool
+    - openshift_openstack_num_masters == 1
+    - not openshift_openstack_use_bastion|bool
 
 
 - name: "Add public master cluster hostname records to the public A records (single master behind a bastion)"
 - name: "Add public master cluster hostname records to the public A records (single master behind a bastion)"
   set_fact:
   set_fact:
-    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.bastions[0]].public_v4 } ] }}"
+    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.bastions[0]].public_v4 } ] }}"
   when:
   when:
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
-    - openstack_num_masters == 1
-    - openstack_use_bastion|bool
+    - openshift_openstack_num_masters == 1
+    - openshift_openstack_use_bastion|bool
 
 
 - name: "Add public master cluster hostname records to the public A records (multi-master)"
 - name: "Add public master cluster hostname records to the public A records (multi-master)"
   set_fact:
   set_fact:
-    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].public_v4 } ] }}"
+    public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(openshift_openstack_full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].public_v4 } ] }}"
   when:
   when:
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
     - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
-    - openstack_num_masters > 1
+    - openshift_openstack_num_masters > 1
 
 
 - name: "Set the public DNS server details to use the external value (if provided)"
 - name: "Set the public DNS server details to use the external value (if provided)"
   set_fact:
   set_fact:
-    nsupdate_server_public: "{{ external_nsupdate_keys['public']['server'] }}"
-    nsupdate_key_secret_public: "{{ external_nsupdate_keys['public']['key_secret'] }}"
-    nsupdate_key_algorithm_public: "{{ external_nsupdate_keys['public']['key_algorithm'] }}"
-    nsupdate_public_key_name: "{{ external_nsupdate_keys['public']['key_name']|default('public-' + full_dns_domain) }}"
+    nsupdate_server_public: "{{ openshift_openstack_external_nsupdate_keys['public']['server'] }}"
+    nsupdate_key_secret_public: "{{ openshift_openstack_external_nsupdate_keys['public']['key_secret'] }}"
+    nsupdate_key_algorithm_public: "{{ openshift_openstack_external_nsupdate_keys['public']['key_algorithm'] }}"
+    nsupdate_public_key_name: "{{ openshift_openstack_external_nsupdate_keys['public']['key_name']|default('public-' + openshift_openstack_full_dns_domain) }}"
   when:
   when:
-    - external_nsupdate_keys is defined
-    - external_nsupdate_keys['public'] is defined
+    - openshift_openstack_external_nsupdate_keys is defined
+    - openshift_openstack_external_nsupdate_keys['public'] is defined
 
 
 - name: "Generate the public Add section for DNS"
 - name: "Generate the public Add section for DNS"
   set_fact:
   set_fact:
     public_named_records:
     public_named_records:
       - view: "public"
       - view: "public"
-        zone: "{{ full_dns_domain }}"
+        zone: "{{ openshift_openstack_full_dns_domain }}"
         server: "{{ nsupdate_server_public }}"
         server: "{{ nsupdate_server_public }}"
-        key_name: "{{ nsupdate_public_key_name|default('public-' + full_dns_domain) }}"
+        key_name: "{{ nsupdate_public_key_name|default('public-' + openshift_openstack_full_dns_domain) }}"
         key_secret: "{{ nsupdate_key_secret_public }}"
         key_secret: "{{ nsupdate_key_secret_public }}"
         key_algorithm: "{{ nsupdate_key_algorithm_public | lower }}"
         key_algorithm: "{{ nsupdate_key_algorithm_public | lower }}"
         entries: "{{ public_records }}"
         entries: "{{ public_records }}"
 
 
 
 
-- name: "Generate the final dns_records_add"
+- name: "Generate the final openshift_openstack_dns_records_add"
   set_fact:
   set_fact:
-    dns_records_add: "{{ private_named_records + public_named_records }}"
+    openshift_openstack_dns_records_add: "{{ private_named_records + public_named_records }}"
 
 
 
 
 - name: "Add DNS A records"
 - name: "Add DNS A records"
@@ -119,7 +119,7 @@
     # TODO(shadower): add a cleanup playbook that removes these records, too!
     # TODO(shadower): add a cleanup playbook that removes these records, too!
     state: present
     state: present
   with_subelements:
   with_subelements:
-  - "{{ dns_records_add | default({}) }}"
+  - "{{ openshift_openstack_dns_records_add | default({}) }}"
   - entries
   - entries
   register: nsupdate_add_result
   register: nsupdate_add_result
   until: nsupdate_add_result|succeeded
   until: nsupdate_add_result|succeeded

+ 4 - 4
roles/openshift_openstack/tasks/provision.yml

@@ -2,14 +2,14 @@
 - name: Generate the templates
 - name: Generate the templates
   include: generate-templates.yml
   include: generate-templates.yml
   when:
   when:
-  - stack_state == 'present'
+  - openshift_openstack_stack_state == 'present'
 
 
 - name: Handle the Stack (create/delete)
 - name: Handle the Stack (create/delete)
   ignore_errors: False
   ignore_errors: False
   register: stack_create
   register: stack_create
   os_stack:
   os_stack:
-    name: "{{ stack_name }}"
-    state: "{{ stack_state }}"
+    name: "{{ openshift_openstack_stack_name }}"
+    state: "{{ openshift_openstack_stack_state }}"
     template: "{{ stack_template_path | default(omit) }}"
     template: "{{ stack_template_path | default(omit) }}"
     wait: yes
     wait: yes
 
 
@@ -19,7 +19,7 @@
 - name: CleanUp
 - name: CleanUp
   include: cleanup.yml
   include: cleanup.yml
   when:
   when:
-  - stack_state == 'present'
+  - openshift_openstack_stack_state == 'present'
 
 
 # TODO(shadower): create the registry and PV Cinder volumes if specified
 # TODO(shadower): create the registry and PV Cinder volumes if specified
 # and include the `prepare-and-format-cinder-volume` tasks to set it up
 # and include the `prepare-and-format-cinder-volume` tasks to set it up

+ 4 - 4
roles/openshift_openstack/templates/docker-storage-setup-dm.j2

@@ -1,4 +1,4 @@
-DEVS="{{ docker_dev }}"
-VG="{{ docker_vg }}"
-DATA_SIZE="{{ docker_data_size }}"
-EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.basesize={{ docker_dm_basesize }}"
+DEVS="{{ openshift_openstack_container_storage_setup.docker_dev }}"
+VG="{{ openshift_openstack_container_storage_setup.docker_vg }}"
+DATA_SIZE="{{ openshift_openstack_container_storage_setup.docker_data_size }}"
+EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.basesize={{ openshift_openstack_container_storage_setup.docker_dm_basesize }}"

+ 5 - 5
roles/openshift_openstack/templates/docker-storage-setup-overlayfs.j2

@@ -1,7 +1,7 @@
-DEVS="{{ docker_dev }}"
-VG="{{ docker_vg }}"
-DATA_SIZE="{{ docker_data_size }}"
+DEVS="{{ openshift_openstack_container_storage_setup.docker_dev }}"
+VG="{{ openshift_openstack_container_storage_setup.docker_vg }}"
+DATA_SIZE="{{ openshift_openstack_container_storage_setup.docker_data_size }}"
 STORAGE_DRIVER=overlay2
 STORAGE_DRIVER=overlay2
-CONTAINER_ROOT_LV_NAME="{{ container_root_lv_name }}"
-CONTAINER_ROOT_LV_MOUNT_PATH="{{ container_root_lv_mount_path }}"
+CONTAINER_ROOT_LV_NAME="{{ openshift_openstack_container_storage_setup.container_root_lv_name }}"
+CONTAINER_ROOT_LV_MOUNT_PATH="{{ openshift_openstack_container_storage_setup.container_root_lv_mount_path }}"
 CONTAINER_ROOT_LV_SIZE=100%FREE
 CONTAINER_ROOT_LV_SIZE=100%FREE

+ 168 - 168
roles/openshift_openstack/templates/heat_stack.yaml.j2

@@ -54,7 +54,7 @@ outputs:
     description: Floating IPs of the nodes
     description: Floating IPs of the nodes
     value: { get_attr: [ infra_nodes, floating_ip ] }
     value: { get_attr: [ infra_nodes, floating_ip ] }
 
 
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
   dns_name:
   dns_name:
     description: Name of the DNS
     description: Name of the DNS
     value:
     value:
@@ -72,11 +72,11 @@ outputs:
 {% endif %}
 {% endif %}
 
 
 conditions:
 conditions:
-  no_floating: {% if openstack_provider_network_name or openstack_use_bastion|bool %}true{% else %}false{% endif %}
+  no_floating: {% if openshift_openstack_provider_network_name or openshift_openstack_use_bastion|bool %}true{% else %}false{% endif %}
 
 
 resources:
 resources:
 
 
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
   net:
   net:
     type: OS::Neutron::Net
     type: OS::Neutron::Net
     properties:
     properties:
@@ -84,7 +84,7 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-net
           template: openshift-ansible-cluster_id-net
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
 
 
   subnet:
   subnet:
     type: OS::Neutron::Subnet
     type: OS::Neutron::Subnet
@@ -93,26 +93,26 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-subnet
           template: openshift-ansible-cluster_id-subnet
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       network: { get_resource: net }
       network: { get_resource: net }
       cidr:
       cidr:
         str_replace:
         str_replace:
           template: subnet_24_prefix.0/24
           template: subnet_24_prefix.0/24
           params:
           params:
-            subnet_24_prefix: {{ openstack_subnet_prefix }}
+            subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
       allocation_pools:
       allocation_pools:
         - start:
         - start:
             str_replace:
             str_replace:
               template: subnet_24_prefix.3
               template: subnet_24_prefix.3
               params:
               params:
-                subnet_24_prefix: {{ openstack_subnet_prefix }}
+                subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
           end:
           end:
             str_replace:
             str_replace:
               template: subnet_24_prefix.254
               template: subnet_24_prefix.254
               params:
               params:
-                subnet_24_prefix: {{ openstack_subnet_prefix }}
+                subnet_24_prefix: {{ openshift_openstack_subnet_prefix }}
       dns_nameservers:
       dns_nameservers:
-{% for nameserver in openstack_dns_nameservers %}
+{% for nameserver in openshift_openstack_dns_nameservers %}
         - {{ nameserver }}
         - {{ nameserver }}
 {% endfor %}
 {% endfor %}
 
 
@@ -120,13 +120,13 @@ resources:
   data_net:
   data_net:
     type: OS::Neutron::Net
     type: OS::Neutron::Net
     properties:
     properties:
-      name: openshift-ansible-{{ stack_name }}-data-net
+      name: openshift-ansible-{{ openshift_openstack_stack_name }}-data-net
       port_security_enabled: false
       port_security_enabled: false
 
 
   data_subnet:
   data_subnet:
     type: OS::Neutron::Subnet
     type: OS::Neutron::Subnet
     properties:
     properties:
-      name: openshift-ansible-{{ stack_name }}-data-subnet
+      name: openshift-ansible-{{ openshift_openstack_stack_name }}-data-subnet
       network: { get_resource: data_net }
       network: { get_resource: data_net }
       cidr: {{ osm_cluster_network_cidr|default('10.128.0.0/14') }}
       cidr: {{ osm_cluster_network_cidr|default('10.128.0.0/14') }}
       gateway_ip: null
       gateway_ip: null
@@ -139,9 +139,9 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-router
           template: openshift-ansible-cluster_id-router
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       external_gateway_info:
       external_gateway_info:
-        network: {{ openstack_external_network_name }}
+        network: {{ openshift_openstack_external_network_name }}
 
 
   interface:
   interface:
     type: OS::Neutron::RouterInterface
     type: OS::Neutron::RouterInterface
@@ -158,8 +158,8 @@ resources:
 #        str_replace:
 #        str_replace:
 #          template: openshift-ansible-cluster_id-keypair
 #          template: openshift-ansible-cluster_id-keypair
 #          params:
 #          params:
-#            cluster_id: {{ stack_name }}
-#      public_key: {{ openstack_keypair_name }}
+#            cluster_id: {{ openshift_openstack_stack_name }}
+#      public_key: {{ openshift_openstack_keypair_name }}
 
 
   common-secgrp:
   common-secgrp:
     type: OS::Neutron::SecurityGroup
     type: OS::Neutron::SecurityGroup
@@ -168,30 +168,30 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-common-secgrp
           template: openshift-ansible-cluster_id-common-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Basic ssh/icmp security group for cluster_id OpenShift cluster
           template: Basic ssh/icmp security group for cluster_id OpenShift cluster
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 22
           port_range_min: 22
           port_range_max: 22
           port_range_max: 22
-          remote_ip_prefix: {{ ssh_ingress_cidr }}
-{% if openstack_use_bastion|bool %}
+          remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
+{% if openshift_openstack_use_bastion|bool %}
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 22
           port_range_min: 22
           port_range_max: 22
           port_range_max: 22
-          remote_ip_prefix: {{ bastion_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_bastion_ingress_cidr }}
 {% endif %}
 {% endif %}
         - direction: ingress
         - direction: ingress
           protocol: icmp
           protocol: icmp
-          remote_ip_prefix: {{ ssh_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
 
 
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
   flat-secgrp:
   flat-secgrp:
     type: OS::Neutron::SecurityGroup
     type: OS::Neutron::SecurityGroup
     properties:
     properties:
@@ -199,12 +199,12 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-flat-secgrp
           template: openshift-ansible-cluster_id-flat-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id OpenShift cluster
           template: Security group for cluster_id OpenShift cluster
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
@@ -280,12 +280,12 @@ resources:
           protocol: tcp
           protocol: tcp
           port_range_min: 30000
           port_range_min: 30000
           port_range_max: 32767
           port_range_max: 32767
-          remote_ip_prefix: {{ node_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 30000
           port_range_min: 30000
           port_range_max: 32767
           port_range_max: 32767
-          remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+          remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
 {% else %}
 {% else %}
   master-secgrp:
   master-secgrp:
     type: OS::Neutron::SecurityGroup
     type: OS::Neutron::SecurityGroup
@@ -294,12 +294,12 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-master-secgrp
           template: openshift-ansible-cluster_id-master-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id OpenShift cluster master
           template: Security group for cluster_id OpenShift cluster master
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
@@ -355,12 +355,12 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-etcd-secgrp
           template: openshift-ansible-cluster_id-etcd-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id etcd cluster
           template: Security group for cluster_id etcd cluster
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
@@ -381,12 +381,12 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-node-secgrp
           template: openshift-ansible-cluster_id-node-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id OpenShift cluster nodes
           template: Security group for cluster_id OpenShift cluster nodes
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
@@ -412,12 +412,12 @@ resources:
           protocol: tcp
           protocol: tcp
           port_range_min: 30000
           port_range_min: 30000
           port_range_max: 32767
           port_range_max: 32767
-          remote_ip_prefix: {{ node_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 30000
           port_range_min: 30000
           port_range_max: 32767
           port_range_max: 32767
-          remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+          remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
 {% endif %}
 {% endif %}
 
 
   infra-secgrp:
   infra-secgrp:
@@ -427,12 +427,12 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-infra-secgrp
           template: openshift-ansible-cluster_id-infra-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id OpenShift infrastructure cluster nodes
           template: Security group for cluster_id OpenShift infrastructure cluster nodes
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
@@ -443,7 +443,7 @@ resources:
           port_range_min: 443
           port_range_min: 443
           port_range_max: 443
           port_range_max: 443
 
 
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
   dns-secgrp:
   dns-secgrp:
     type: OS::Neutron::SecurityGroup
     type: OS::Neutron::SecurityGroup
     properties:
     properties:
@@ -451,67 +451,67 @@ resources:
         str_replace:
         str_replace:
           template: openshift-ansible-cluster_id-dns-secgrp
           template: openshift-ansible-cluster_id-dns-secgrp
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       description:
       description:
         str_replace:
         str_replace:
           template: Security group for cluster_id cluster DNS
           template: Security group for cluster_id cluster DNS
           params:
           params:
-            cluster_id: {{ stack_name }}
+            cluster_id: {{ openshift_openstack_stack_name }}
       rules:
       rules:
         - direction: ingress
         - direction: ingress
           protocol: udp
           protocol: udp
           port_range_min: 53
           port_range_min: 53
           port_range_max: 53
           port_range_max: 53
-          remote_ip_prefix: {{ node_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
         - direction: ingress
         - direction: ingress
           protocol: udp
           protocol: udp
           port_range_min: 53
           port_range_min: 53
           port_range_max: 53
           port_range_max: 53
-          remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+          remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 53
           port_range_min: 53
           port_range_max: 53
           port_range_max: 53
-          remote_ip_prefix: {{ node_ingress_cidr }}
+          remote_ip_prefix: {{ openshift_openstack_node_ingress_cidr }}
         - direction: ingress
         - direction: ingress
           protocol: tcp
           protocol: tcp
           port_range_min: 53
           port_range_min: 53
           port_range_max: 53
           port_range_max: 53
-          remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24"
+          remote_ip_prefix: "{{ openshift_openstack_subnet_prefix }}.0/24"
 {% endif %}
 {% endif %}
 
 
-{% if openstack_num_masters|int > 1 or openshift_ui_ssh_tunnel|bool %}
+{% if openshift_openstack_num_masters|int > 1 or openshift_openstack_ui_ssh_tunnel|bool %}
   lb-secgrp:
   lb-secgrp:
     type: OS::Neutron::SecurityGroup
     type: OS::Neutron::SecurityGroup
     properties:
     properties:
-      name: openshift-ansible-{{ stack_name }}-lb-secgrp
-      description: Security group for {{ stack_name }} cluster Load Balancer
+      name: openshift-ansible-{{ openshift_openstack_stack_name }}-lb-secgrp
+      description: Security group for {{ openshift_openstack_stack_name }} cluster Load Balancer
       rules:
       rules:
       - direction: ingress
       - direction: ingress
         protocol: tcp
         protocol: tcp
         port_range_min: {{ openshift_master_api_port | default(8443) }}
         port_range_min: {{ openshift_master_api_port | default(8443) }}
         port_range_max: {{ openshift_master_api_port | default(8443) }}
         port_range_max: {{ openshift_master_api_port | default(8443) }}
-        remote_ip_prefix: {{ lb_ingress_cidr | default(bastion_ingress_cidr) }}
-{% if openshift_ui_ssh_tunnel|bool %}
+        remote_ip_prefix: {{ openshift_openstack_lb_ingress_cidr | default(openshift_openstack_bastion_ingress_cidr) }}
+{% if openshift_openstack_ui_ssh_tunnel|bool %}
       - direction: ingress
       - direction: ingress
         protocol: tcp
         protocol: tcp
         port_range_min: {{ openshift_master_api_port | default(8443) }}
         port_range_min: {{ openshift_master_api_port | default(8443) }}
         port_range_max: {{ openshift_master_api_port | default(8443) }}
         port_range_max: {{ openshift_master_api_port | default(8443) }}
-        remote_ip_prefix: {{ ssh_ingress_cidr }}
+        remote_ip_prefix: {{ openshift_openstack_ssh_ingress_cidr }}
 {% endif %}
 {% endif %}
 {% if openshift_master_console_port is defined and openshift_master_console_port != openshift_master_api_port %}
 {% if openshift_master_console_port is defined and openshift_master_console_port != openshift_master_api_port %}
       - direction: ingress
       - direction: ingress
         protocol: tcp
         protocol: tcp
         port_range_min: {{ openshift_master_console_port | default(8443) }}
         port_range_min: {{ openshift_master_console_port | default(8443) }}
         port_range_max: {{ openshift_master_console_port | default(8443) }}
         port_range_max: {{ openshift_master_console_port | default(8443) }}
-        remote_ip_prefix: {{ lb_ingress_cidr | default(bastion_ingress_cidr) }}
+        remote_ip_prefix: {{ openshift_openstack_lb_ingress_cidr | default(openshift_openstack_bastion_ingress_cidr) }}
 {% endif %}
 {% endif %}
 {% endif %}
 {% endif %}
 
 
   etcd:
   etcd:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
-      count: {{ openstack_num_etcd }}
+      count: {{ openshift_openstack_num_etcd }}
       resource_def:
       resource_def:
         type: server.yaml
         type: server.yaml
         properties:
         properties:
@@ -519,23 +519,23 @@ resources:
             str_replace:
             str_replace:
               template: k8s_type-%index%.cluster_id
               template: k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                k8s_type: {{ openstack_etcd_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                k8s_type: {{ openshift_openstack_etcd_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: etcds
                 k8s_type: etcds
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        etcd
           type:        etcd
-          image:       {{ openstack_etcd_image }}
-          flavor:      {{ openstack_etcd_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_etcd_image }}
+          flavor:      {{ openshift_openstack_etcd_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -543,40 +543,40 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
-            - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} }
+            - { get_resource: {% if openshift_openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} }
             - { get_resource: common-secgrp }
             - { get_resource: common-secgrp }
           floating_network:
           floating_network:
             if:
             if:
               - no_floating
               - no_floating
               - null
               - null
-              - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+              - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
           attach_float_net: false
           attach_float_net: false
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_etcd_volume_size }}
-{% if not openstack_provider_network_name %}
+          volume_size: {{ openshift_openstack_etcd_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}
 
 
-{% if openstack_master_server_group_policies|length > 0 %}
+{% if openshift_openstack_master_server_group_policies|length > 0 %}
   master_server_group:
   master_server_group:
     type: OS::Nova::ServerGroup
     type: OS::Nova::ServerGroup
     properties:
     properties:
       name: master_server_group
       name: master_server_group
-      policies: {{ openstack_master_server_group_policies }}
+      policies: {{ openshift_openstack_master_server_group_policies }}
 {% endif %}
 {% endif %}
-{% if openstack_infra_server_group_policies|length > 0 %}
+{% if openshift_openstack_infra_server_group_policies|length > 0 %}
   infra_server_group:
   infra_server_group:
     type: OS::Nova::ServerGroup
     type: OS::Nova::ServerGroup
     properties:
     properties:
       name: infra_server_group
       name: infra_server_group
-      policies: {{ openstack_infra_server_group_policies }}
+      policies: {{ openshift_openstack_infra_server_group_policies }}
 {% endif %}
 {% endif %}
-{% if openstack_num_masters|int > 1 %}
+{% if openshift_openstack_num_masters|int > 1 %}
   loadbalancer:
   loadbalancer:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
@@ -588,23 +588,23 @@ resources:
             str_replace:
             str_replace:
               template: k8s_type-%index%.cluster_id
               template: k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                k8s_type: {{ openstack_lb_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                k8s_type: {{ openshift_openstack_lb_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: lb
                 k8s_type: lb
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        lb
           type:        lb
-          image:       {{ openstack_lb_image }}
-          flavor:      {{ openstack_lb_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_lb_image }}
+          flavor:      {{ openshift_openstack_lb_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -612,16 +612,16 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
             - { get_resource: lb-secgrp }
             - { get_resource: lb-secgrp }
             - { get_resource: common-secgrp }
             - { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
-          floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+          floating_network: {{ openshift_openstack_external_network_name }}
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_lb_volume_size }}
-{% if not openstack_provider_network_name %}
+          volume_size: {{ openshift_openstack_lb_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}
@@ -630,7 +630,7 @@ resources:
   masters:
   masters:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
-      count: {{ openstack_num_masters }}
+      count: {{ openshift_openstack_num_masters }}
       resource_def:
       resource_def:
         type: server.yaml
         type: server.yaml
         properties:
         properties:
@@ -638,23 +638,23 @@ resources:
             str_replace:
             str_replace:
               template: k8s_type-%index%.cluster_id
               template: k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                k8s_type: {{ openstack_master_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                k8s_type: {{ openshift_openstack_master_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: masters
                 k8s_type: masters
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        master
           type:        master
-          image:       {{ openstack_master_image }}
-          flavor:      {{ openstack_master_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_master_image }}
+          flavor:      {{ openshift_openstack_master_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -662,7 +662,7 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% if openshift_use_flannel|default(False)|bool %}
 {% if openshift_use_flannel|default(False)|bool %}
           attach_data_net: true
           attach_data_net: true
           data_net:    { get_resource: data_net }
           data_net:    { get_resource: data_net }
@@ -670,12 +670,12 @@ resources:
 {% endif %}
 {% endif %}
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
             - { get_resource: flat-secgrp }
             - { get_resource: flat-secgrp }
 {% else %}
 {% else %}
             - { get_resource: master-secgrp }
             - { get_resource: master-secgrp }
             - { get_resource: node-secgrp }
             - { get_resource: node-secgrp }
-{% if openstack_num_etcd|int == 0 %}
+{% if openshift_openstack_num_etcd|int == 0 %}
             - { get_resource: etcd-secgrp }
             - { get_resource: etcd-secgrp }
 {% endif %}
 {% endif %}
 {% endif %}
 {% endif %}
@@ -684,16 +684,16 @@ resources:
             if:
             if:
               - no_floating
               - no_floating
               - null
               - null
-              - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+              - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
           attach_float_net: false
           attach_float_net: false
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_master_volume_size }}
-{% if openstack_master_server_group_policies|length > 0 %}
+          volume_size: {{ openshift_openstack_master_volume_size }}
+{% if openshift_openstack_master_server_group_policies|length > 0 %}
           scheduler_hints:
           scheduler_hints:
             group: { get_resource: master_server_group }
             group: { get_resource: master_server_group }
 {% endif %}
 {% endif %}
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}
@@ -701,9 +701,9 @@ resources:
   compute_nodes:
   compute_nodes:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
-      count: {{ openstack_num_nodes }}
+      count: {{ openshift_openstack_num_nodes }}
       removal_policies:
       removal_policies:
-      - resource_list: {{ openstack_nodes_to_remove }}
+      - resource_list: {{ openshift_openstack_nodes_to_remove }}
       resource_def:
       resource_def:
         type: server.yaml
         type: server.yaml
         properties:
         properties:
@@ -711,28 +711,28 @@ resources:
             str_replace:
             str_replace:
               template: sub_type_k8s_type-%index%.cluster_id
               template: sub_type_k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                sub_type_k8s_type: {{ openstack_node_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                sub_type_k8s_type: {{ openshift_openstack_node_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: nodes
                 k8s_type: nodes
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        node
           type:        node
           subtype:     app
           subtype:     app
           node_labels:
           node_labels:
-{% for k, v in openshift_cluster_node_labels.app.iteritems() %}
+{% for k, v in openshift_openstack_cluster_node_labels.app.iteritems() %}
             {{ k|e }}: {{ v|e }}
             {{ k|e }}: {{ v|e }}
 {% endfor %}
 {% endfor %}
-          image:       {{ openstack_node_image }}
-          flavor:      {{ openstack_node_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_node_image }}
+          flavor:      {{ openshift_openstack_node_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -740,7 +740,7 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% if openshift_use_flannel|default(False)|bool %}
 {% if openshift_use_flannel|default(False)|bool %}
           attach_data_net: true
           attach_data_net: true
           data_net:    { get_resource: data_net }
           data_net:    { get_resource: data_net }
@@ -748,18 +748,18 @@ resources:
 {% endif %}
 {% endif %}
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
-            - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}node-secgrp{% endif %} }
+            - { get_resource: {% if openshift_openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}node-secgrp{% endif %} }
             - { get_resource: common-secgrp }
             - { get_resource: common-secgrp }
           floating_network:
           floating_network:
             if:
             if:
               - no_floating
               - no_floating
               - null
               - null
-              - {{ openstack_external_network_name }}
-{% if openstack_use_bastion|bool or openstack_provider_network_name %}
+              - {{ openshift_openstack_external_network_name }}
+{% if openshift_openstack_use_bastion|bool or openshift_openstack_provider_network_name %}
           attach_float_net: false
           attach_float_net: false
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_node_volume_size }}
-{% if not openstack_provider_network_name %}
+          volume_size: {{ openshift_openstack_node_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}
@@ -767,7 +767,7 @@ resources:
   infra_nodes:
   infra_nodes:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
-      count: {{ openstack_num_infra }}
+      count: {{ openshift_openstack_num_infra }}
       resource_def:
       resource_def:
         type: server.yaml
         type: server.yaml
         properties:
         properties:
@@ -775,28 +775,28 @@ resources:
             str_replace:
             str_replace:
               template: sub_type_k8s_type-%index%.cluster_id
               template: sub_type_k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                sub_type_k8s_type: {{ openstack_infra_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                sub_type_k8s_type: {{ openshift_openstack_infra_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: infra
                 k8s_type: infra
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        node
           type:        node
           subtype:     infra
           subtype:     infra
           node_labels:
           node_labels:
-{% for k, v in openshift_cluster_node_labels.infra.iteritems() %}
+{% for k, v in openshift_openstack_cluster_node_labels.infra.iteritems() %}
             {{ k|e }}: {{ v|e }}
             {{ k|e }}: {{ v|e }}
 {% endfor %}
 {% endfor %}
-          image:       {{ openstack_infra_image }}
-          flavor:      {{ openstack_infra_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_infra_image }}
+          flavor:      {{ openshift_openstack_infra_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -804,7 +804,7 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% if openshift_use_flannel|default(False)|bool %}
 {% if openshift_use_flannel|default(False)|bool %}
           attach_data_net: true
           attach_data_net: true
           data_net:    { get_resource: data_net }
           data_net:    { get_resource: data_net }
@@ -813,34 +813,34 @@ resources:
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
 # TODO(bogdando) filter only required node rules into infra-secgrp
 # TODO(bogdando) filter only required node rules into infra-secgrp
-{% if openstack_flat_secgrp|default(False)|bool %}
+{% if openshift_openstack_flat_secgrp|default(False)|bool %}
             - { get_resource: flat-secgrp }
             - { get_resource: flat-secgrp }
 {% else %}
 {% else %}
             - { get_resource: node-secgrp }
             - { get_resource: node-secgrp }
 {% endif %}
 {% endif %}
-{% if openshift_ui_ssh_tunnel|bool and openstack_num_masters|int < 2 %}
+{% if openshift_openstack_ui_ssh_tunnel|bool and openshift_openstack_num_masters|int < 2 %}
             - { get_resource: lb-secgrp }
             - { get_resource: lb-secgrp }
 {% endif %}
 {% endif %}
             - { get_resource: infra-secgrp }
             - { get_resource: infra-secgrp }
             - { get_resource: common-secgrp }
             - { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
-          floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+          floating_network: {{ openshift_openstack_external_network_name }}
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_infra_volume_size }}
-{% if openstack_infra_server_group_policies|length > 0 %}
+          volume_size: {{ openshift_openstack_infra_volume_size }}
+{% if openshift_openstack_infra_server_group_policies|length > 0 %}
           scheduler_hints:
           scheduler_hints:
             group: { get_resource: infra_server_group }
             group: { get_resource: infra_server_group }
 {% endif %}
 {% endif %}
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}
 
 
-{% if openstack_num_dns|int > 0 %}
+{% if openshift_openstack_num_dns|int > 0 %}
   dns:
   dns:
     type: OS::Heat::ResourceGroup
     type: OS::Heat::ResourceGroup
     properties:
     properties:
-      count: {{ openstack_num_dns }}
+      count: {{ openshift_openstack_num_dns }}
       resource_def:
       resource_def:
         type: server.yaml
         type: server.yaml
         properties:
         properties:
@@ -848,23 +848,23 @@ resources:
             str_replace:
             str_replace:
               template: k8s_type-%index%.cluster_id
               template: k8s_type-%index%.cluster_id
               params:
               params:
-                cluster_id: {{ stack_name }}
-                k8s_type: {{ openstack_dns_hostname }}
-          cluster_env: {{ public_dns_domain }}
-          cluster_id:  {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
+                k8s_type: {{ openshift_openstack_dns_hostname }}
+          cluster_env: {{ openshift_openstack_public_dns_domain }}
+          cluster_id:  {{ openshift_openstack_stack_name }}
           group:
           group:
             str_replace:
             str_replace:
               template: k8s_type.cluster_id
               template: k8s_type.cluster_id
               params:
               params:
                 k8s_type: dns
                 k8s_type: dns
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
           type:        dns
           type:        dns
-          image:       {{ openstack_dns_image }}
-          flavor:      {{ openstack_dns_flavor }}
-          key_name:    {{ openstack_keypair_name }}
-{% if openstack_provider_network_name %}
-          net:         {{ openstack_provider_network_name }}
-          net_name:         {{ openstack_provider_network_name }}
+          image:       {{ openshift_openstack_dns_image }}
+          flavor:      {{ openshift_openstack_dns_flavor }}
+          key_name:    {{ openshift_openstack_keypair_name }}
+{% if openshift_openstack_provider_network_name %}
+          net:         {{ openshift_openstack_provider_network_name }}
+          net_name:         {{ openshift_openstack_provider_network_name }}
 {% else %}
 {% else %}
           net:         { get_resource: net }
           net:         { get_resource: net }
           subnet:      { get_resource: subnet }
           subnet:      { get_resource: subnet }
@@ -872,16 +872,16 @@ resources:
             str_replace:
             str_replace:
               template: openshift-ansible-cluster_id-net
               template: openshift-ansible-cluster_id-net
               params:
               params:
-                cluster_id: {{ stack_name }}
+                cluster_id: {{ openshift_openstack_stack_name }}
 {% endif %}
 {% endif %}
           secgrp:
           secgrp:
             - { get_resource: dns-secgrp }
             - { get_resource: dns-secgrp }
             - { get_resource: common-secgrp }
             - { get_resource: common-secgrp }
-{% if not openstack_provider_network_name %}
-          floating_network: {{ openstack_external_network_name }}
+{% if not openshift_openstack_provider_network_name %}
+          floating_network: {{ openshift_openstack_external_network_name }}
 {% endif %}
 {% endif %}
-          volume_size: {{ openstack_dns_volume_size }}
-{% if not openstack_provider_network_name %}
+          volume_size: {{ openshift_openstack_dns_volume_size }}
+{% if not openshift_openstack_provider_network_name %}
     depends_on:
     depends_on:
       - interface
       - interface
 {% endif %}
 {% endif %}

+ 8 - 8
roles/openshift_openstack/templates/heat_stack_server.yaml.j2

@@ -61,7 +61,7 @@ parameters:
     label: Net name
     label: Net name
     description: Net name
     description: Net name
 
 
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
   subnet:
   subnet:
     type: string
     type: string
     label: Subnet ID
     label: Subnet ID
@@ -81,7 +81,7 @@ parameters:
     label: Net ID
     label: Net ID
     description: Net resource
     description: Net resource
 
 
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
   data_subnet:
   data_subnet:
     type: string
     type: string
     default: ''
     default: ''
@@ -102,7 +102,7 @@ parameters:
     label: Attach-float-net
     label: Attach-float-net
     description: A switch for floating network port connection
     description: A switch for floating network port connection
 
 
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
   floating_network:
   floating_network:
     type: string
     type: string
     default: ''
     default: ''
@@ -156,7 +156,7 @@ outputs:
         - server
         - server
         - addresses
         - addresses
         - { get_param: net_name }
         - { get_param: net_name }
-{% if openstack_provider_network_name %}
+{% if openshift_openstack_provider_network_name %}
         - 0
         - 0
 {% else %}
 {% else %}
         - 1
         - 1
@@ -226,7 +226,7 @@ resources:
     type: OS::Neutron::Port
     type: OS::Neutron::Port
     properties:
     properties:
       network: { get_param: net }
       network: { get_param: net }
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
       fixed_ips:
       fixed_ips:
         - subnet: { get_param: subnet }
         - subnet: { get_param: subnet }
 {% endif %}
 {% endif %}
@@ -239,13 +239,13 @@ resources:
     properties:
     properties:
       network: { get_param: data_net }
       network: { get_param: data_net }
       port_security_enabled: false
       port_security_enabled: false
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
       fixed_ips:
       fixed_ips:
         - subnet: { get_param: data_subnet }
         - subnet: { get_param: data_subnet }
 {% endif %}
 {% endif %}
 {% endif %}
 {% endif %}
 
 
-{% if not openstack_provider_network_name %}
+{% if not openshift_openstack_provider_network_name %}
   floating-ip:
   floating-ip:
     condition: { not: no_floating }
     condition: { not: no_floating }
     type: OS::Neutron::FloatingIP
     type: OS::Neutron::FloatingIP
@@ -254,7 +254,7 @@ resources:
       port_id: { get_resource: port }
       port_id: { get_resource: port }
 {% endif %}
 {% endif %}
 
 
-{% if not ephemeral_volumes|default(false)|bool %}
+{% if not openshift_openstack_ephemeral_volumes|default(false)|bool %}
   cinder_volume:
   cinder_volume:
     type: OS::Cinder::Volume
     type: OS::Cinder::Volume
     properties:
     properties: