aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/openstack/templates/nova.conf5
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf5
-rw-r--r--deploy/adapters/ansible/roles/heat/templates/heat.j25
-rw-r--r--deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py9
4 files changed, 8 insertions, 16 deletions
diff --git a/deploy/adapters/ansible/openstack/templates/nova.conf b/deploy/adapters/ansible/openstack/templates/nova.conf
index 3cd2c03b..eb7ec053 100644
--- a/deploy/adapters/ansible/openstack/templates/nova.conf
+++ b/deploy/adapters/ansible/openstack/templates/nova.conf
@@ -3,11 +3,6 @@
{% set _ = memcached_servers.append('%s:11211'% host) %}
{% endfor %}
{% set memcached_servers = memcached_servers|join(',') %}
-{% if ansible_processor_vcpus > 10 %}
-{% set api_workers = ansible_processor_vcpus // 10 %}
-{% else %}
-{% set api_workers = 1 %}
-{% endif %}
[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
diff --git a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
index 8b035653..4ad2da2e 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
+++ b/deploy/adapters/ansible/roles/cinder-controller/templates/cinder.conf
@@ -3,11 +3,6 @@
{% set _ = memcached_servers.append('%s:11211'% host) %}
{% endfor %}
{% set memcached_servers = memcached_servers|join(',') %}
-{% if ansible_processor_vcpus > 5 %}
-{% set api_workers = ansible_processor_vcpus // 5 %}
-{% else %}
-{% set api_workers = 1 %}
-{% endif %}
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
diff --git a/deploy/adapters/ansible/roles/heat/templates/heat.j2 b/deploy/adapters/ansible/roles/heat/templates/heat.j2
index d73bd70b..a8feb940 100644
--- a/deploy/adapters/ansible/roles/heat/templates/heat.j2
+++ b/deploy/adapters/ansible/roles/heat/templates/heat.j2
@@ -3,11 +3,6 @@
{% set _ = memcached_servers.append('%s:11211'% host) %}
{% endfor %}
{% set memcached_servers = memcached_servers|join(',') %}
-{% if ansible_processor_vcpus > 5 %}
-{% set api_workers = ansible_processor_vcpus // 5 %}
-{% else %}
-{% set api_workers = 1 %}
-{% endif %}
[DEFAULT]
heat_metadata_server_url = http://{{ internal_vip.ip }}:8000
diff --git a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
index ab13e088..64c0469e 100644
--- a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
+++ b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
@@ -10,6 +10,8 @@
import yaml
import netaddr
import os
+import platform
+import re
import log as logging
LOG = logging.getLogger("net-init")
@@ -88,6 +90,11 @@ def main(config):
setup_ips(config["ip_settings"], config["sys_intf_mappings"])
if __name__ == "__main__":
- os.system("service openvswitch-switch status|| service openvswitch-switch start") # noqa
+ if re.search('Ubuntu', platform.platform()):
+ os.system("service openvswitch-switch start")
+ elif re.search('redhat|centos', platform.platform()):
+ os.system("service openvswitch start")
+ else:
+ os.system("echo 'ERROR: no service named openvswitch'")
config = yaml.load(open(config_path))
main(config)