template-ify the juju config for cord and opencloud cases
diff --git a/roles/juju-setup/defaults/main.yml b/roles/juju-setup/defaults/main.yml
index cd21505..bbbb92e 100644
--- a/roles/juju-setup/defaults/main.yml
+++ b/roles/juju-setup/defaults/main.yml
@@ -1,2 +1,6 @@
---
+juju_config_name: opencloud
+juju_config_path: /usr/local/src/juju_config.yml
+
+charm_versions: {}
diff --git a/roles/juju-setup/files/cord_juju_config.yml b/roles/juju-setup/files/cord_juju_config.yml
deleted file mode 100644
index a400f84..0000000
--- a/roles/juju-setup/files/cord_juju_config.yml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-# juju configuration file for CORD deployments
-
-ceilometer:
- openstack-origin: cloud:trusty-kilo
-
-ceilometer-agent: {}
-
-glance:
- ha-mcastport: 5402
- openstack-origin: cloud:trusty-kilo
-
-keystone:
- ha-mcastport: 5403
- https-service-endpoints: "False"
- openstack-origin: cloud:trusty-kilo
- use-https: "no"
-
-mongodb: {}
-
-nagios: {}
-
-neutron-api:
- neutron-plugin: onosvtn
- onos-vtn-ip: onos-cord
- neutron-security-groups: True
- openstack-origin: cloud:trusty-kilo
- overlay-network-type: vxlan
-
-neutron-openvswitch: {}
-
-nova-cloud-controller:
- config-flags: "force_config_drive=always"
- console-access-protocol: novnc
- network-manager: Neutron
- openstack-origin: cloud:trusty-kilo
-
-nova-compute:
- config-flags: firewall_driver=nova.virt.firewall.NoopFirewallDriver
- disable-neutron-security-groups: True
- openstack-origin: cloud:trusty-kilo
-
-nrpe: {}
-
-ntp: {}
-
-openstack-dashboard:
- openstack-origin: cloud:trusty-kilo
-
-percona-cluster:
- max-connections: 20000
-
-rabbitmq-server:
- ssl: 'off'
-
-
diff --git a/roles/juju-setup/tasks/main.yml b/roles/juju-setup/tasks/main.yml
index dd08a42..895de5b 100644
--- a/roles/juju-setup/tasks/main.yml
+++ b/roles/juju-setup/tasks/main.yml
@@ -62,7 +62,7 @@
- name: Copy over juju-config.yml for configuring Juju services
become: yes
template:
- src={{ juju_config_file }}
+ src={{ juju_config_name }}_juju_config.yml.j2
dest={{ juju_config_path }}
# Code for this is in library/juju_facts.py
diff --git a/roles/juju-setup/templates/cord_juju_config.yml.j2 b/roles/juju-setup/templates/cord_juju_config.yml.j2
new file mode 100644
index 0000000..a549769
--- /dev/null
+++ b/roles/juju-setup/templates/cord_juju_config.yml.j2
@@ -0,0 +1,59 @@
+---
+# juju configuration file for CORD deployments
+
+ceilometer:
+ openstack-origin: "cloud:trusty-kilo"
+
+ceilometer-agent: {}
+
+glance:
+ openstack-origin: "cloud:trusty-kilo"
+ ha-mcastport: 5402
+
+keystone:
+ admin-password: "{{ keystone_admin_password }}"
+ os-public-hostname: "keystone.{{ site_suffix }}"
+ ha-mcastport: 5403
+ https-service-endpoints: "True"
+ openstack-origin: "cloud:trusty-kilo"
+ use-https: "yes"
+
+mongodb: {}
+
+nagios: {}
+
+neutron-api:
+ neutron-plugin: onosvtn
+ onos-vtn-ip: onos-cord
+ neutron-security-groups: "True"
+ openstack-origin: "cloud:trusty-kilo"
+ overlay-network-type: vxlan
+
+neutron-openvswitch: {}
+
+nova-cloud-controller:
+ config-flags: "force_config_drive=always"
+ console-access-protocol: novnc
+ network-manager: Neutron
+ openstack-origin: "cloud:trusty-kilo"
+
+nova-compute:
+ virt-type: kvm
+ config-flags: "firewall_driver=nova.virt.firewall.NoopFirewallDriver"
+ disable-neutron-security-groups: "True"
+ openstack-origin: "cloud:trusty-kilo"
+
+nrpe: {}
+
+ntp: {}
+
+openstack-dashboard:
+ openstack-origin: "cloud:trusty-kilo"
+
+percona-cluster:
+ max-connections: 20000
+
+rabbitmq-server:
+ ssl: "on"
+
+
diff --git a/roles/juju-setup/files/opencloud_juju_config.yml b/roles/juju-setup/templates/opencloud_juju_config.yml.j2
similarity index 92%
rename from roles/juju-setup/files/opencloud_juju_config.yml
rename to roles/juju-setup/templates/opencloud_juju_config.yml.j2
index 79f9dd7..7911828 100644
--- a/roles/juju-setup/files/opencloud_juju_config.yml
+++ b/roles/juju-setup/templates/opencloud_juju_config.yml.j2
@@ -9,6 +9,8 @@
openstack-origin: "cloud:trusty-kilo"
keystone:
+ admin-password: "{{ keystone_admin_password }}"
+ os-public-hostname: "keystone.{{ site_suffix }}"
use-https: "yes"
https-service-endpoints: "True"
openstack-origin: "cloud:trusty-kilo"