aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/common/vars/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml8
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml2
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mongodb.yml5
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/ha/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg14
-rw-r--r--deploy/adapters/ansible/roles/heat/tasks/heat_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/templates/keystone.conf11
-rw-r--r--deploy/adapters/ansible/roles/memcached/tasks/main.yml13
-rw-r--r--deploy/adapters/ansible/roles/memcached/vars/Debian.yml7
-rw-r--r--deploy/adapters/ansible/roles/memcached/vars/RedHat.yml7
-rw-r--r--deploy/adapters/ansible/roles/memcached/vars/main.yml6
-rw-r--r--deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/tasks/main.yml11
-rw-r--r--deploy/adapters/ansible/roles/nova-compute/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/setup-network/tasks/main.yml8
26 files changed, 97 insertions, 33 deletions
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml
index cb78acb6..98ac1274 100644
--- a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/main.yml
@@ -15,3 +15,7 @@
- ceilometer_configs_templates
- dest
notify: restart ceilometer relation service
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: ceilometer_services
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
index cb78acb6..98ac1274 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
@@ -15,3 +15,7 @@
- ceilometer_configs_templates
- dest
notify: restart ceilometer relation service
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: ceilometer_services
diff --git a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml
index 686ce1f5..66bb5f06 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml
+++ b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml
@@ -4,7 +4,7 @@
with_items: packages | union(packages_noarch)
- name: generate common cinder service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: upload cinder conf
diff --git a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
index 6b193d6e..342f61ae 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate cinder volume service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: check if physical device exists
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index d4247ce5..c4c10099 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -52,3 +52,7 @@
- name: restart services
service: name={{ item }} state=restarted enabled=yes
with_items: services| union(services_noarch)
+
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
+ with_items: services| union(services_noarch)
diff --git a/deploy/adapters/ansible/roles/common/vars/main.yml b/deploy/adapters/ansible/roles/common/vars/main.yml
index e3dfa496..2c5b5679 100644
--- a/deploy/adapters/ansible/roles/common/vars/main.yml
+++ b/deploy/adapters/ansible/roles/common/vars/main.yml
@@ -2,7 +2,5 @@
packages_noarch:
- python-pip
- ntp
- - memcached
-services_noarch:
- - memcached
+services_noarch: []
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index 54e48c25..86b4f93d 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -11,6 +11,9 @@
- name: restart http services
service: name={{ http_service }} state=restarted enabled=yes
+- name: write services to monitor list
+ lineinfile: dest=/opt/service create=yes line='{{ http_service }}'
+
- name: install dashboard packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: packages | union(packages_noarch)
@@ -18,11 +21,6 @@
- name: remove ubuntu theme
action: "{{ ansible_pkg_mgr }} name=openstack-dashboard-ubuntu-theme state=absent"
-- name: update memcached conf
- lineinfile: dest=/etc/memcached.conf state=present
- regexp="-l *"
- line="-l {{ internal_vip.ip }}"
-
- name: update ubuntu horizon settings
lineinfile:
dest: /etc/openstack-dashboard/local_settings.py
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
index 96df442d..35ee5858 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_cluster_debian.yml
@@ -3,6 +3,7 @@
service:
name: mysql
state: restarted
+ enabled: yes
args: "--wsrep-new-cluster"
when:
- inventory_hostname == haproxy_hosts.keys()[0]
@@ -21,6 +22,7 @@
service:
name: mysql
state: restarted
+ enabled: yes
when:
- inventory_hostname != haproxy_hosts.keys()[0]
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
index 41ee5ffe..97e00503 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
@@ -46,4 +46,4 @@
shell: rm -rf /var/lib/mysql/ib_logfile*
- name: set owner
- file: path=/var/lib owner=mysql group=mysql recurse=yes state=directory
+ file: path=/var/lib/mysql owner=mysql group=mysql recurse=yes state=directory
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
index c5e1d6d1..ada7f7ef 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb.yml
@@ -21,7 +21,10 @@
- /var/lib/mongodb/journal/*
- name: manually restart mongodb server
- service: name={{ mongodb_service }} state=restarted
+ service: name={{ mongodb_service }} state=restarted enabled=yes
+
+- name: write mongodb to monitor list
+ lineinfile: dest=/opt/service create=yes line={{ mongodb_service}}
- wait_for: port=27017 delay=3 timeout=60 host={{ internal_vip.ip }}
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
index 1a34c6f5..bd6b582b 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
@@ -4,7 +4,7 @@
with_items: packages | union(packages_noarch)
- name: generate glance service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update glance conf
diff --git a/deploy/adapters/ansible/roles/ha/tasks/main.yml b/deploy/adapters/ansible/roles/ha/tasks/main.yml
index 668f6847..f60740a3 100644
--- a/deploy/adapters/ansible/roles/ha/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ha/tasks/main.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate ha service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: install pexpect
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 0778bb13..7d783a30 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -169,12 +169,16 @@ listen proxy-ceilometer_api_cluster
listen proxy-dashboarad
bind {{ public_vip.ip }}:80
- option tcpka
- option httpchk
- option tcplog
- balance source
+ mode http
+ balance source
+ capture cookie vgnvisitor= len 32
+ cookie SERVERID insert indirect nocache
+ option forwardfor
+ option httpchk
+ option httpclose
+ rspidel ^Set-cookie:\ IP=
{% for host,ip in haproxy_hosts.items() %}
- server {{ host }} {{ ip }}:80 weight 1 check inter 2000 rise 2 fall 5
+ server {{ host }} {{ ip }}:80 cookie {{ host }} weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen stats
diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
index ab23f873..32d8f42e 100644
--- a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
+++ b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate heat service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update heat conf
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
index e4488016..172d356e 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate keystone service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update keystone conf
diff --git a/deploy/adapters/ansible/roles/keystone/templates/keystone.conf b/deploy/adapters/ansible/roles/keystone/templates/keystone.conf
index b022a084..22173e44 100644
--- a/deploy/adapters/ansible/roles/keystone/templates/keystone.conf
+++ b/deploy/adapters/ansible/roles/keystone/templates/keystone.conf
@@ -1,3 +1,8 @@
+{% set memcached_servers = [] %}
+{% for host in haproxy_hosts.values() %}
+{% set _ = memcached_servers.append('%s:11211'% host) %}
+{% endfor %}
+{% set memcached_servers = memcached_servers|join(',') %}
[DEFAULT]
admin_token={{ ADMIN_TOKEN }}
@@ -518,8 +523,8 @@ log_dir = /var/log/keystone
# (dogpile.cache.redis) be used in production deployments.
# Small workloads (single process) like devstack can use the
# dogpile.cache.memory backend. (string value)
-#backend=keystone.common.cache.noop
-
+backend=keystone.cache.memcache_pool
+memcache_servers={{ memcached_servers}}
# Use a key-mangling function (sha1) to ensure fixed length
# cache-keys. This is toggle-able for debugging purposes, it
# is highly recommended to always leave this set to True.
@@ -540,7 +545,7 @@ log_dir = /var/log/keystone
# Global toggle for all caching using the should_cache_fn
# mechanism. (boolean value)
-#enabled=false
+enabled=true
# Extra debugging from the cache backend (cache keys,
# get/set/delete/etc calls) This is only really useful if you
diff --git a/deploy/adapters/ansible/roles/memcached/tasks/main.yml b/deploy/adapters/ansible/roles/memcached/tasks/main.yml
new file mode 100644
index 00000000..8b955cbb
--- /dev/null
+++ b/deploy/adapters/ansible/roles/memcached/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+- include_vars: "{{ ansible_os_family }}.yml"
+
+- name: install packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
+ with_items: packages | union(packages_noarch)
+
+- name: change memcache listen ip
+ lineinfile: dest=/etc/memcached.conf regexp="^-l " line="-l 0.0.0.0"
+
+- name: restart services
+ service: name={{ item }} state=restarted enabled=yes
+ with_items: services| union(services_noarch)
diff --git a/deploy/adapters/ansible/roles/memcached/vars/Debian.yml b/deploy/adapters/ansible/roles/memcached/vars/Debian.yml
new file mode 100644
index 00000000..7a0d09de
--- /dev/null
+++ b/deploy/adapters/ansible/roles/memcached/vars/Debian.yml
@@ -0,0 +1,7 @@
+---
+packages:
+ - python-memcache
+
+services: []
+
+
diff --git a/deploy/adapters/ansible/roles/memcached/vars/RedHat.yml b/deploy/adapters/ansible/roles/memcached/vars/RedHat.yml
new file mode 100644
index 00000000..8cd2462c
--- /dev/null
+++ b/deploy/adapters/ansible/roles/memcached/vars/RedHat.yml
@@ -0,0 +1,7 @@
+---
+packages:
+ - python-memcached
+
+pip_packages: []
+
+services: []
diff --git a/deploy/adapters/ansible/roles/memcached/vars/main.yml b/deploy/adapters/ansible/roles/memcached/vars/main.yml
new file mode 100644
index 00000000..40c400a6
--- /dev/null
+++ b/deploy/adapters/ansible/roles/memcached/vars/main.yml
@@ -0,0 +1,6 @@
+---
+packages_noarch:
+ - memcached
+
+services_noarch:
+ - memcached
diff --git a/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
index 640692ff..f3474ea4 100644
--- a/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
@@ -24,7 +24,7 @@
when: ansible_os_family == 'RedHat'
- name: generate neutron compute service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: config ml2 plugin
diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
index fce12722..044163e8 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate neutron control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: get tenant id to fill neutron.conf
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
index f8e9e8c4..fc1bc638 100644
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
@@ -36,7 +36,7 @@
with_items: packages | union(packages_noarch)
- name: generate neutron network service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: fix openstack neutron plugin config file
@@ -82,7 +82,8 @@
- include: odl.yml
when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS }}"
-- name: restart neutron services
- debug: msg="restart neutron services"
- notify:
- - restart neutron network relation service
+- name: restart neutron network relation service
+ service: name={{ item }} state=restarted enabled=yes
+ with_flattened:
+ - services_noarch
+ - services
diff --git a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
index f4bb373e..45dab3f8 100644
--- a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
@@ -20,7 +20,7 @@
- restart nova-compute services
- name: generate neutron control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml b/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml
index 7242fda6..58159589 100644
--- a/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml
+++ b/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml
@@ -6,7 +6,7 @@
with_items: packages | union(packages_noarch)
- name: generate nova control service list
- shell: echo {{ item }} >> /opt/service
+ lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
- name: update nova conf
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
index 818ac57a..6f024f18 100644
--- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
@@ -1,4 +1,12 @@
---
+- name: disable NetworkManager
+ service: name=NetworkManager state=stopped enabled=no
+ when: ansible_os_family == 'RedHat'
+
+- name: enable network service
+ service: name=network state=started enabled=yes
+ when: ansible_os_family == 'RedHat'
+
- name: add ovs bridge
openvswitch_bridge: bridge={{ item["name"] }} state=present
with_items: "{{ network_cfg['provider_net_mappings'] }}"