aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/group_vars/all.yml3
-rw-r--r--ansible/inventory/all-in-one10
-rw-r--r--ansible/inventory/multinode7
-rw-r--r--ansible/prechecks.yml4
-rw-r--r--ansible/roles/aodh/tasks/config.yml11
-rw-r--r--ansible/roles/aodh/tasks/precheck.yml1
-rw-r--r--ansible/roles/barbican/tasks/config.yml11
-rw-r--r--ansible/roles/barbican/tasks/precheck.yml1
-rw-r--r--ansible/roles/barbican/templates/barbican.conf.j21
-rw-r--r--ansible/roles/baremetal/tasks/pre-install.yml13
-rw-r--r--ansible/roles/baremetal/tasks/precheck.yml1
-rw-r--r--ansible/roles/bifrost/tasks/precheck.yml1
-rw-r--r--ansible/roles/bifrost/tasks/reconfigure.yml63
-rw-r--r--ansible/roles/bifrost/tasks/upgrade.yml3
-rw-r--r--ansible/roles/ceilometer/defaults/main.yml5
-rw-r--r--ansible/roles/ceilometer/tasks/bootstrap.yml24
-rw-r--r--ansible/roles/ceilometer/tasks/config.yml11
-rw-r--r--ansible/roles/ceilometer/tasks/precheck.yml1
-rw-r--r--ansible/roles/ceilometer/templates/wsgi-ceilometer-api.conf.j22
-rw-r--r--ansible/roles/ceph/tasks/precheck.yml1
-rw-r--r--ansible/roles/certificates/tasks/precheck.yml1
-rw-r--r--ansible/roles/cinder/tasks/config.yml11
-rw-r--r--ansible/roles/cinder/tasks/precheck.yml1
-rw-r--r--ansible/roles/cloudkitty/tasks/config.yml11
-rw-r--r--ansible/roles/cloudkitty/tasks/precheck.yml1
-rw-r--r--ansible/roles/collectd/tasks/precheck.yml1
-rw-r--r--ansible/roles/common/tasks/config.yml3
-rw-r--r--ansible/roles/common/tasks/precheck.yml1
-rw-r--r--ansible/roles/common/templates/admin-openrc.sh.j23
-rw-r--r--ansible/roles/common/templates/cron-logrotate-ceilometer.conf.j23
-rw-r--r--ansible/roles/common/templates/cron-logrotate-grafana.conf.j23
-rw-r--r--ansible/roles/common/templates/cron.json.j22
-rw-r--r--ansible/roles/common/templates/heka-ceilometer.toml.j213
-rw-r--r--ansible/roles/common/templates/heka-grafana.toml.j218
-rw-r--r--ansible/roles/common/templates/heka-openstack.toml.j22
-rw-r--r--ansible/roles/common/templates/heka.json.j27
-rw-r--r--ansible/roles/congress/tasks/config.yml11
-rw-r--r--ansible/roles/congress/tasks/precheck.yml1
-rw-r--r--ansible/roles/destroy/tasks/precheck.yml1
-rw-r--r--ansible/roles/elasticsearch/tasks/precheck.yml1
-rw-r--r--ansible/roles/etcd/tasks/precheck.yml1
-rw-r--r--ansible/roles/glance/tasks/config.yml11
-rw-r--r--ansible/roles/glance/tasks/precheck.yml1
-rw-r--r--ansible/roles/gnocchi/tasks/config.yml11
-rw-r--r--ansible/roles/gnocchi/tasks/precheck.yml1
-rw-r--r--ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j22
-rw-r--r--ansible/roles/grafana/tasks/precheck.yml1
-rw-r--r--ansible/roles/haproxy/tasks/precheck.yml1
-rw-r--r--ansible/roles/haproxy/templates/haproxy.cfg.j22
-rw-r--r--ansible/roles/heat/tasks/config.yml11
-rw-r--r--ansible/roles/heat/tasks/precheck.yml1
-rw-r--r--ansible/roles/horizon/tasks/precheck.yml1
-rw-r--r--ansible/roles/influxdb/tasks/precheck.yml1
-rw-r--r--ansible/roles/ironic/tasks/config.yml11
-rw-r--r--ansible/roles/ironic/tasks/precheck.yml1
-rw-r--r--ansible/roles/iscsi/tasks/precheck.yml1
-rw-r--r--ansible/roles/keystone/tasks/config.yml2
-rw-r--r--ansible/roles/keystone/tasks/precheck.yml1
-rw-r--r--ansible/roles/keystone/templates/wsgi-keystone.conf.j24
-rw-r--r--ansible/roles/kibana/tasks/precheck.yml1
-rw-r--r--ansible/roles/kuryr/tasks/config.yml11
-rw-r--r--ansible/roles/kuryr/tasks/precheck.yml1
-rw-r--r--ansible/roles/magnum/tasks/config.yml11
-rw-r--r--ansible/roles/magnum/tasks/precheck.yml1
-rw-r--r--ansible/roles/magnum/templates/magnum.conf.j28
-rw-r--r--ansible/roles/manila/defaults/main.yml3
-rw-r--r--ansible/roles/manila/tasks/config.yml14
-rw-r--r--ansible/roles/manila/tasks/deploy.yml2
-rw-r--r--ansible/roles/manila/tasks/precheck.yml1
-rw-r--r--ansible/roles/manila/tasks/pull.yml7
-rw-r--r--ansible/roles/manila/tasks/reconfigure.yml5
-rw-r--r--ansible/roles/manila/tasks/start.yml14
-rw-r--r--ansible/roles/manila/templates/manila-data.json.j218
-rw-r--r--ansible/roles/mariadb/tasks/precheck.yml1
-rw-r--r--ansible/roles/mariadb/templates/galera.cnf.j210
-rw-r--r--ansible/roles/memcached/defaults/main.yml5
-rw-r--r--ansible/roles/memcached/tasks/precheck.yml1
-rw-r--r--ansible/roles/memcached/templates/memcached.json.j23
-rw-r--r--ansible/roles/mistral/tasks/config.yml11
-rw-r--r--ansible/roles/mistral/tasks/precheck.yml1
-rw-r--r--ansible/roles/mongodb/tasks/precheck.yml1
-rw-r--r--ansible/roles/multipathd/tasks/precheck.yml1
-rw-r--r--ansible/roles/murano/tasks/config.yml11
-rw-r--r--ansible/roles/murano/tasks/precheck.yml1
-rw-r--r--ansible/roles/murano/templates/murano.conf.j23
-rw-r--r--ansible/roles/neutron/tasks/config.yml11
-rw-r--r--ansible/roles/neutron/tasks/precheck.yml1
-rw-r--r--ansible/roles/nova/tasks/config.yml11
-rw-r--r--ansible/roles/nova/tasks/precheck.yml1
-rw-r--r--ansible/roles/prechecks/tasks/port_checks.yml68
-rw-r--r--ansible/roles/prechecks/tasks/precheck.yml1
-rw-r--r--ansible/roles/rabbitmq/tasks/precheck.yml1
-rw-r--r--ansible/roles/rally/tasks/config.yml11
-rw-r--r--ansible/roles/rally/tasks/precheck.yml1
-rw-r--r--ansible/roles/sahara/tasks/config.yml11
-rw-r--r--ansible/roles/sahara/tasks/precheck.yml1
-rw-r--r--ansible/roles/searchlight/tasks/config.yml11
-rw-r--r--ansible/roles/searchlight/tasks/precheck.yml1
-rw-r--r--ansible/roles/senlin/tasks/config.yml11
-rw-r--r--ansible/roles/senlin/tasks/precheck.yml1
-rw-r--r--ansible/roles/swift/tasks/config.yml11
-rw-r--r--ansible/roles/swift/tasks/precheck.yml1
-rw-r--r--ansible/roles/swift/templates/object.conf.j22
-rw-r--r--ansible/roles/telegraf/tasks/precheck.yml1
-rw-r--r--ansible/roles/telegraf/tasks/start.yml1
-rw-r--r--ansible/roles/telegraf/templates/telegraf.conf.j22
-rw-r--r--ansible/roles/tempest/tasks/config.yml11
-rw-r--r--ansible/roles/tempest/tasks/precheck.yml1
-rw-r--r--ansible/roles/vmtp/tasks/precheck.yml1
-rw-r--r--ansible/roles/watcher/tasks/config.yml11
-rw-r--r--ansible/roles/watcher/tasks/precheck.yml1
-rw-r--r--ansible/site.yml7
112 files changed, 603 insertions, 69 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 7834e5ddf..24772f765 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -26,7 +26,7 @@ orchestration_engine: "ANSIBLE"
# Valid options are [ COPY_ONCE, COPY_ALWAYS ]
config_strategy: "COPY_ALWAYS"
-# Valid options are [ centos, fedora, oraclelinux, ubuntu ]
+# Valid options are [ centos, oraclelinux, ubuntu ]
kolla_base_distro: "centos"
# Valid options are [ binary, source ]
kolla_install_type: "binary"
@@ -322,6 +322,7 @@ haproxy_user: "openstack"
haproxy_enable_external_vip: "{{ 'no' if kolla_external_vip_address == kolla_internal_vip_address else 'yes' }}"
kolla_enable_tls_external: "no"
kolla_external_fqdn_cert: "{{ node_config_directory }}/certificates/haproxy.pem"
+kolla_external_fqdn_cacert: "{{ node_config_directory }}/certificates/haproxy-ca.crt"
####################
diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one
index b5ea09a38..f603b04c0 100644
--- a/ansible/inventory/all-in-one
+++ b/ansible/inventory/all-in-one
@@ -20,6 +20,9 @@ localhost ansible_connection=local
[collectd:children]
compute
+[baremetal:children]
+control
+
[grafana:children]
monitoring
@@ -30,7 +33,11 @@ control
control
[telegraf:children]
+compute
+control
monitoring
+network
+storage
[elasticsearch:children]
control
@@ -239,6 +246,9 @@ manila
[manila-share:children]
storage
+[manila-data:children]
+storage
+
# Swift
[swift-proxy-server:children]
swift
diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode
index 150af0e93..6139dae8a 100644
--- a/ansible/inventory/multinode
+++ b/ansible/inventory/multinode
@@ -51,7 +51,11 @@ monitoring
control
[telegraf:children]
+compute
+control
monitoring
+network
+storage
[elasticsearch:children]
control
@@ -257,6 +261,9 @@ manila
[manila-share:children]
storage
+[manila-data:children]
+storage
+
# Swift
[swift-proxy-server:children]
swift
diff --git a/ansible/prechecks.yml b/ansible/prechecks.yml
deleted file mode 100644
index 49903a95b..000000000
--- a/ansible/prechecks.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- hosts: all
- roles:
- - prechecks
diff --git a/ansible/roles/aodh/tasks/config.yml b/ansible/roles/aodh/tasks/config.yml
index d420bd6c6..90179933a 100644
--- a/ansible/roles/aodh/tasks/config.yml
+++ b/ansible/roles/aodh/tasks/config.yml
@@ -45,3 +45,14 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-aodh.conf"
with_items:
- "aodh-api"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/aodh/policy.json"
+ register: aodh_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/aodh/policy.json"
+ dest: "{{ node_config_directory }}/aodh/policy.json"
+ when:
+ aodh_policy.stat.exists
diff --git a/ansible/roles/aodh/tasks/precheck.yml b/ansible/roles/aodh/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/aodh/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/barbican/tasks/config.yml b/ansible/roles/barbican/tasks/config.yml
index 38383d544..fab9b3dda 100644
--- a/ansible/roles/barbican/tasks/config.yml
+++ b/ansible/roles/barbican/tasks/config.yml
@@ -51,3 +51,14 @@
- "barbican-api"
- "barbican-keystone-listener"
- "barbican-worker"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/barbican/policy.json"
+ register: barbican_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/barbican/policy.json"
+ dest: "{{ node_config_directory }}/barbican/policy.json"
+ when:
+ barbican_policy.stat.exists
diff --git a/ansible/roles/barbican/tasks/precheck.yml b/ansible/roles/barbican/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/barbican/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/barbican/templates/barbican.conf.j2 b/ansible/roles/barbican/templates/barbican.conf.j2
index b6e0e14a1..55c6b2210 100644
--- a/ansible/roles/barbican/templates/barbican.conf.j2
+++ b/ansible/roles/barbican/templates/barbican.conf.j2
@@ -10,6 +10,7 @@ backlog = 4096
max_allowed_secret_in_bytes = 10000
max_allowed_request_size_in_bytes = 1000000
+db_auto_create = False
sql_connection = mysql://{{ barbican_database_user }}:{{ barbican_database_password }}@{{ barbican_database_address }}/{{ barbican_database_name }}
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
diff --git a/ansible/roles/baremetal/tasks/pre-install.yml b/ansible/roles/baremetal/tasks/pre-install.yml
index ab50d4d17..0ea5e5a18 100644
--- a/ansible/roles/baremetal/tasks/pre-install.yml
+++ b/ansible/roles/baremetal/tasks/pre-install.yml
@@ -7,20 +7,16 @@
- name: Gather facts
setup:
-- name: Get node hostname
- shell: echo $(hostname)
- register: node_hostname
-
-- name: Update /etc/hosts with hostname
+- name: Ensure localhost in /etc/hosts
lineinfile:
dest: /etc/hosts
- regexp: "127.0.0.1 {{ node_hostname.stdout }} localhost"
- line: "127.0.0.1 {{ node_hostname.stdout }} localhost"
+ regexp: "^127.0.0.1.*"
+ line: "127.0.0.1 localhost"
state: present
become: True
when: customize_etc_hosts | bool == True
-- name: Generate etc/hosts
+- name: Generate /etc/hosts for all of the nodes
blockinfile:
dest: /etc/hosts
marker: "# {mark} ANSIBLE GENERATED HOSTS"
@@ -28,6 +24,7 @@
{% for host in groups['all'] %}
{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }} {{ hostvars[host]['ansible_hostname'] }}
{% endfor %}
+ become: True
when: customize_etc_hosts | bool == True
- name: Ensure sudo group is present
diff --git a/ansible/roles/baremetal/tasks/precheck.yml b/ansible/roles/baremetal/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/baremetal/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/bifrost/tasks/precheck.yml b/ansible/roles/bifrost/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/bifrost/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/bifrost/tasks/reconfigure.yml b/ansible/roles/bifrost/tasks/reconfigure.yml
index ed97d539c..fdd316fcc 100644
--- a/ansible/roles/bifrost/tasks/reconfigure.yml
+++ b/ansible/roles/bifrost/tasks/reconfigure.yml
@@ -1 +1,64 @@
---
+- name: Ensuring the containers up
+ kolla_docker:
+ name: "{{ item.name }}"
+ action: "get_container_state"
+ register: container_state
+ failed_when: container_state.Running == false
+ when: inventory_hostname in groups[item.group]
+ with_items:
+ - { name: bifrost-deploy, group: bifrost-deploy }
+
+- include: config.yml
+
+- name: Check the configs
+ command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
+ changed_when: false
+ failed_when: false
+ register: check_results
+ when: inventory_hostname in groups[item.group]
+ with_items:
+ - { name: bifrost-deploy, group: bifrost-deploy }
+
+# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
+# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
+# just remove the container and start again
+- name: Containers config strategy
+ kolla_docker:
+ name: "{{ item.name }}"
+ action: "get_container_env"
+ register: container_envs
+ when: inventory_hostname in groups[item.group]
+ with_items:
+ - { name: bifrost-deploy, group: bifrost-deploy }
+
+- name: Remove the containers
+ kolla_docker:
+ name: "{{ item[0]['name'] }}"
+ action: "remove_container"
+ register: remove_containers
+ when:
+ - inventory_hostname in groups[item[0]['group']]
+ - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
+ - item[2]['rc'] == 1
+ with_together:
+ - [{ name: bifrost-deploy, group: bifrost-deploy }]
+ - "{{ container_envs.results }}"
+ - "{{ check_results.results }}"
+
+- include: start.yml
+ when: remove_containers.changed
+
+- name: Restart containers
+ kolla_docker:
+ name: "{{ item[0]['name'] }}"
+ action: "restart_container"
+ when:
+ - inventory_hostname in groups[item[0]['group']]
+ - config_strategy == 'COPY_ALWAYS'
+ - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
+ - item[2]['rc'] == 1
+ with_together:
+ - [{ name: bifrost-deploy, group: bifrost-deploy }]
+ - "{{ container_envs.results }}"
+ - "{{ check_results.results }}"
diff --git a/ansible/roles/bifrost/tasks/upgrade.yml b/ansible/roles/bifrost/tasks/upgrade.yml
index ed97d539c..1f16915ad 100644
--- a/ansible/roles/bifrost/tasks/upgrade.yml
+++ b/ansible/roles/bifrost/tasks/upgrade.yml
@@ -1 +1,4 @@
---
+- include: config.yml
+
+- include: start.yml
diff --git a/ansible/roles/ceilometer/defaults/main.yml b/ansible/roles/ceilometer/defaults/main.yml
index b914e62d9..e3d015df6 100644
--- a/ansible/roles/ceilometer/defaults/main.yml
+++ b/ansible/roles/ceilometer/defaults/main.yml
@@ -7,9 +7,10 @@ project_name: "ceilometer"
####################
ceilometer_database_name: "ceilometer"
ceilometer_database_user: "ceilometer"
+ceilometer_database_port: "{{ mondodb_port if ceilometer_database_type == 'mongodb' else database_port }}"
-ceilometer_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mongodb_port }}{% if not loop.last %},{% endif %}{% endfor %}"
-ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}:{{ database_port }}"
+ceilometer_database_mongodb_address: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ ceilometer_database_port }}{% if not loop.last %},{% endif %}{% endfor %}"
+ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}:{{ ceilometer_database_port }}"
####################
diff --git a/ansible/roles/ceilometer/tasks/bootstrap.yml b/ansible/roles/ceilometer/tasks/bootstrap.yml
index 0ceae2fd0..7078709ed 100644
--- a/ansible/roles/ceilometer/tasks/bootstrap.yml
+++ b/ansible/roles/ceilometer/tasks/bootstrap.yml
@@ -10,11 +10,26 @@
when:
- ceilometer_database_type == "mongodb"
+- name: Checking Ceilometer mysql database
+ command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
+ -m mysql_db
+ -a "login_host='{{ ceilometer_database_mysql_address }}'
+ login_port='{{ ceilometer_database_port }}'
+ login_user='{{ ceilometer_database_user }}'
+ login_password='{{ ceilometer_database_password }}'
+ name='{{ ceilometer_database_name }}'"
+ register: mysql_access
+ failed_when: False
+ changed_when: False
+ run_once: True
+ when:
+ - ceilometer_database_type == "mysql"
+
- name: Creating Ceilometer mysql database
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_db
-a "login_host='{{ ceilometer_database_mysql_address }}'
- login_port='{{ database_port }}'
+ login_port='{{ ceilometer_database_port }}'
login_user='{{ database_user }}'
login_password='{{ database_password }}'
name='{{ ceilometer_database_name }}'"
@@ -26,12 +41,13 @@
delegate_to: "{{ groups['ceilometer-api'][0] }}"
when:
- ceilometer_database_type == "mysql"
+ - "'FAILED' in mysql_access.stdout"
- name: Creating Ceilometer database user and setting permissions
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m mysql_user
-a "login_host='{{ ceilometer_database_mysql_address }}'
- login_port='{{ database_port }}'
+ login_port='{{ ceilometer_database_port }}'
login_user='{{ database_user }}'
login_password='{{ database_password }}'
name='{{ ceilometer_database_name }}'
@@ -47,9 +63,11 @@
delegate_to: "{{ groups['ceilometer-api'][0] }}"
when:
- ceilometer_database_type == "mysql"
+ - "'FAILED' in mysql_access.stdout"
# TODO(Jeffrey4l): fix idempotent when ceilomter_database_type == "gnocchi"
+# NOTE(vbel): bootstrapping of mysql db for ceilometer is idempotent
- include: bootstrap_service.yml
when: ((ceilometer_database_type == "mongodb" and mongodb_ceilometer_database.changed)
- or (ceilometer_database_type == "mysql" and mysql_ceilometer_database.changed)
+ or ceilometer_database_type == "mysql"
or ceilometer_database_type == "gnocchi")
diff --git a/ansible/roles/ceilometer/tasks/config.yml b/ansible/roles/ceilometer/tasks/config.yml
index 5d9336fec..63c77f38d 100644
--- a/ansible/roles/ceilometer/tasks/config.yml
+++ b/ansible/roles/ceilometer/tasks/config.yml
@@ -59,3 +59,14 @@
- "event_definitions.yaml"
- "event_pipeline.yaml"
- "pipeline.yaml"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/ceilometer/policy.json"
+ register: ceilometer_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/ceilometer/policy.json"
+ dest: "{{ node_config_directory }}/ceilometer/policy.json"
+ when:
+ ceilometer_policy.stat.exists
diff --git a/ansible/roles/ceilometer/tasks/precheck.yml b/ansible/roles/ceilometer/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/ceilometer/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/ceilometer/templates/wsgi-ceilometer-api.conf.j2 b/ansible/roles/ceilometer/templates/wsgi-ceilometer-api.conf.j2
index c91167f3e..4adb84bf2 100644
--- a/ansible/roles/ceilometer/templates/wsgi-ceilometer-api.conf.j2
+++ b/ansible/roles/ceilometer/templates/wsgi-ceilometer-api.conf.j2
@@ -7,7 +7,7 @@ Listen {{ api_interface_address }}:{{ ceilometer_api_port }}
CustomLog /var/log/kolla/ceilometer/ceilometer-api-access.log combined
WSGIScriptReloading On
- WSGIDaemonProcess ceilometer-api processes=5 threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path={{ python_path }}
+ WSGIDaemonProcess ceilometer-api processes={{ openstack_service_workers }} threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup ceilometer-api
WSGIScriptAlias / {{ python_path }}/ceilometer/api/app.wsgi
diff --git a/ansible/roles/ceph/tasks/precheck.yml b/ansible/roles/ceph/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/ceph/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/certificates/tasks/precheck.yml b/ansible/roles/certificates/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/certificates/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml
index f40187816..800401615 100644
--- a/ansible/roles/cinder/tasks/config.yml
+++ b/ansible/roles/cinder/tasks/config.yml
@@ -38,3 +38,14 @@
- "cinder-backup"
- "cinder-scheduler"
- "cinder-volume"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/cinder/policy.json"
+ register: cinder_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/cinder/policy.json"
+ dest: "{{ node_config_directory }}/cinder/policy.json"
+ when:
+ cinder_policy.stat.exists
diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/cinder/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/cloudkitty/tasks/config.yml b/ansible/roles/cloudkitty/tasks/config.yml
index 234109eba..ea3d13cbb 100644
--- a/ansible/roles/cloudkitty/tasks/config.yml
+++ b/ansible/roles/cloudkitty/tasks/config.yml
@@ -32,3 +32,14 @@
with_items:
- "cloudkitty-api"
- "cloudkitty-processor"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/cloudkitty/policy.json"
+ register: cloudkitty_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/cloudkitty/policy.json"
+ dest: "{{ node_config_directory }}/cloudkitty/policy.json"
+ when:
+ cloudkitty_policy.stat.exists
diff --git a/ansible/roles/cloudkitty/tasks/precheck.yml b/ansible/roles/cloudkitty/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/cloudkitty/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/collectd/tasks/precheck.yml b/ansible/roles/collectd/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/collectd/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml
index f6f1ac4a0..6124aa2b3 100644
--- a/ansible/roles/common/tasks/config.yml
+++ b/ansible/roles/common/tasks/config.yml
@@ -30,6 +30,7 @@
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
- { name: "global", enabled: "yes" }
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
+ - { name: "grafana", enabled: "{{ enable_grafana }}" }
- { name: "haproxy", enabled: "{{ enable_haproxy }}" }
- { name: "horizon", enabled: "{{ enable_horizon }}" }
- { name: "keepalived", enabled: "{{ enable_haproxy }}" }
@@ -72,12 +73,14 @@
- { name: "ansible", enabled: "yes" }
- { name: "aodh", enabled: "{{ enable_aodh }}" }
- { name: "barbican", enabled: "{{ enable_barbican }}" }
+ - { name: "ceilometer", enabled: "{{ enable_ceilometer }}" }
- { name: "cinder", enabled: "{{ enable_cinder }}" }
- { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" }
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
- { name: "glance", enabled: "{{ enable_glance }}" }
- { name: "global", enabled: "yes" }
- { name: "gnocchi", enabled: "{{ enable_gnocchi }}" }
+ - { name: "grafana", enabled: "{{ enable_grafana }}" }
- { name: "haproxy", enabled: "{{ enable_haproxy }}" }
- { name: "heat", enabled: "{{ enable_heat }}" }
- { name: "iscsid", enabled: "{{ enable_iscsid }}" }
diff --git a/ansible/roles/common/tasks/precheck.yml b/ansible/roles/common/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/common/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/common/templates/admin-openrc.sh.j2 b/ansible/roles/common/templates/admin-openrc.sh.j2
index 7b5a3939b..ef3890043 100644
--- a/ansible/roles/common/templates/admin-openrc.sh.j2
+++ b/ansible/roles/common/templates/admin-openrc.sh.j2
@@ -6,3 +6,6 @@ export OS_USERNAME=admin
export OS_PASSWORD={{ keystone_admin_password }}
export OS_AUTH_URL={{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}/v3
export OS_IDENTITY_API_VERSION=3
+{% if kolla_enable_tls_external | bool and kolla_external_fqdn_cacert %}
+export OS_CACERT={{ kolla_external_fqdn_cacert }}
+{% endif %}
diff --git a/ansible/roles/common/templates/cron-logrotate-ceilometer.conf.j2 b/ansible/roles/common/templates/cron-logrotate-ceilometer.conf.j2
new file mode 100644
index 000000000..5993500a5
--- /dev/null
+++ b/ansible/roles/common/templates/cron-logrotate-ceilometer.conf.j2
@@ -0,0 +1,3 @@
+"/var/log/kolla/ceilometer/*.log"
+{
+}
diff --git a/ansible/roles/common/templates/cron-logrotate-grafana.conf.j2 b/ansible/roles/common/templates/cron-logrotate-grafana.conf.j2
new file mode 100644
index 000000000..2a3a0889a
--- /dev/null
+++ b/ansible/roles/common/templates/cron-logrotate-grafana.conf.j2
@@ -0,0 +1,3 @@
+"/var/log/kolla/grafana/*.log"
+{
+}
diff --git a/ansible/roles/common/templates/cron.json.j2 b/ansible/roles/common/templates/cron.json.j2
index 295ca660b..8a338195e 100644
--- a/ansible/roles/common/templates/cron.json.j2
+++ b/ansible/roles/common/templates/cron.json.j2
@@ -3,11 +3,13 @@
( 'ansible', 'yes' ),
( 'aodh', enable_aodh ),
( 'barbican', enable_barbican ),
+ ( 'ceilometer', enable_ceilometer ),
( 'cinder', enable_cinder ),
( 'cloudkitty', enable_cloudkitty ),
( 'elasticsearch', enable_elasticsearch ),
( 'glance', enable_glance ),
( 'gnocchi', enable_gnocchi ),
+ ( 'grafana', enable_grafana ),
( 'haproxy', enable_haproxy ),
( 'heat', enable_heat ),
( 'iscsid', enable_iscsid ),
diff --git a/ansible/roles/common/templates/heka-ceilometer.toml.j2 b/ansible/roles/common/templates/heka-ceilometer.toml.j2
new file mode 100644
index 000000000..cb2cb538e
--- /dev/null
+++ b/ansible/roles/common/templates/heka-ceilometer.toml.j2
@@ -0,0 +1,13 @@
+[ceilometer_apache_log_decoder]
+type = "SandboxDecoder"
+filename = "lua_decoders/os_ceilometer_apache_log.lua"
+ [ceilometer_apache_log_decoder.config]
+ apache_log_pattern = '%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"'
+
+[ceilometer_apache_logstreamer_input]
+type = "LogstreamerInput"
+decoder = "ceilometer_apache_log_decoder"
+log_directory = "/var/log/kolla"
+file_match = 'ceilometer/(?P<Service>ceilometer-api.*)\.log\.?(?P<Seq>\d*)$'
+priority = ["^Seq"]
+differentiator = ["Service"]
diff --git a/ansible/roles/common/templates/heka-grafana.toml.j2 b/ansible/roles/common/templates/heka-grafana.toml.j2
new file mode 100644
index 000000000..7565c083e
--- /dev/null
+++ b/ansible/roles/common/templates/heka-grafana.toml.j2
@@ -0,0 +1,18 @@
+[grafana_log_decoder]
+type = "SandboxDecoder"
+filename = "lua_decoders/os_grafana_log.lua"
+
+[grafana_log_splitter]
+type = "RegexSplitter"
+delimiter = '\n\n(=[^=]+====)'
+delimiter_eol = false
+deliver_incomplete_final = true
+
+[grafana_logstreamer_input]
+type = "LogstreamerInput"
+decoder = "grafana_log_decoder"
+splitter = "grafana_log_splitter"
+log_directory = "/var/log/kolla"
+file_match = 'grafana/(?P<Service>grafana.*)\.log\.?(?P<Seq>\d*)$'
+priority = ["^Seq"]
+differentiator = ["Service"]
diff --git a/ansible/roles/common/templates/heka-openstack.toml.j2 b/ansible/roles/common/templates/heka-openstack.toml.j2
index 1a2273380..ef6334dc1 100644
--- a/ansible/roles/common/templates/heka-openstack.toml.j2
+++ b/ansible/roles/common/templates/heka-openstack.toml.j2
@@ -6,6 +6,6 @@ filename = "lua_decoders/os_openstack_log.lua"
type = "LogstreamerInput"
decoder = "openstack_log_decoder"
log_directory = "/var/log/kolla"
-file_match = '(?P<Service>cloudkitty|nova|glance|keystone|neutron|ceph|cinder|heat|murano|magnum|mistral|manila|searchlight|senlin|sahara)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
+file_match = '(?P<Service>cloudkitty|nova|glance|keystone|neutron|ceilometer|ceph|cinder|heat|murano|magnum|mistral|manila|searchlight|senlin|sahara)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
priority = ["^Seq"]
differentiator = ["Service", "_", "Program"]
diff --git a/ansible/roles/common/templates/heka.json.j2 b/ansible/roles/common/templates/heka.json.j2
index d94409c77..a49258e4a 100644
--- a/ansible/roles/common/templates/heka.json.j2
+++ b/ansible/roles/common/templates/heka.json.j2
@@ -30,6 +30,13 @@
"optional": {{ (not enable_gnocchi | bool) | string | lower }}
},
{
+ "source": "{{ container_config_directory }}/heka-grafana.toml",
+ "dest": "/etc/heka/heka-grafana.toml",
+ "owner": "heka",
+ "perm": "0600",
+ "optional": {{ (not enable_grafana | bool) | string | lower }}
+ },
+ {
"source": "{{ container_config_directory }}/heka-barbican.toml",
"dest": "/etc/heka/heka-barbican.toml",
"owner": "heka",
diff --git a/ansible/roles/congress/tasks/config.yml b/ansible/roles/congress/tasks/config.yml
index 832a2da86..0e9a63135 100644
--- a/ansible/roles/congress/tasks/config.yml
+++ b/ansible/roles/congress/tasks/config.yml
@@ -35,3 +35,14 @@
- "congress-api"
- "congress-policy-engine"
- "congress-datasource"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/congress/policy.json"
+ register: congress_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/congress/policy.json"
+ dest: "{{ node_config_directory }}/congress/policy.json"
+ when:
+ congress_policy.stat.exists
diff --git a/ansible/roles/congress/tasks/precheck.yml b/ansible/roles/congress/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/congress/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/destroy/tasks/precheck.yml b/ansible/roles/destroy/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/destroy/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/elasticsearch/tasks/precheck.yml b/ansible/roles/elasticsearch/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/elasticsearch/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/etcd/tasks/precheck.yml b/ansible/roles/etcd/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/etcd/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/glance/tasks/config.yml b/ansible/roles/glance/tasks/config.yml
index 88cb5c446..743815ba8 100644
--- a/ansible/roles/glance/tasks/config.yml
+++ b/ansible/roles/glance/tasks/config.yml
@@ -29,3 +29,14 @@
dest: "{{ node_config_directory }}/{{ item.service }}/{{ item.service }}.conf"
when: inventory_hostname in groups[item.group]
with_items: "{{ glance_service_groups }}"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/glance/policy.json"
+ register: glance_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/glance/policy.json"
+ dest: "{{ node_config_directory }}/glance/policy.json"
+ when:
+ glance_policy.stat.exists
diff --git a/ansible/roles/glance/tasks/precheck.yml b/ansible/roles/glance/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/glance/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/gnocchi/tasks/config.yml b/ansible/roles/gnocchi/tasks/config.yml
index 2e7a75a8a..b6fa16dd0 100644
--- a/ansible/roles/gnocchi/tasks/config.yml
+++ b/ansible/roles/gnocchi/tasks/config.yml
@@ -50,3 +50,14 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf"
with_items:
- "gnocchi-api"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/gnocchi/policy.json"
+ register: gnocchi_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/gnocchi/policy.json"
+ dest: "{{ node_config_directory }}/gnocchi/policy.json"
+ when:
+ gnocchi_policy.stat.exists
diff --git a/ansible/roles/gnocchi/tasks/precheck.yml b/ansible/roles/gnocchi/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/gnocchi/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
index 5d1317ec0..3257eb237 100644
--- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
+++ b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2
@@ -6,7 +6,7 @@ Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['addr
ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log"
CustomLog "/var/log/kolla/gnocchi/gnocchi-api-access.log" combined
WSGIApplicationGroup %{GLOBAL}
- WSGIDaemonProcess gnocchi group=gnocchi processes=5 threads=1 user=gnocchi python-path={{ python_path }}
+ WSGIDaemonProcess gnocchi group=gnocchi processes={{ openstack_service_workers }} threads=1 user=gnocchi python-path={{ python_path }}
WSGIProcessGroup gnocchi
WSGIScriptAlias / "{{ python_path }}/gnocchi/rest/app.wsgi"
diff --git a/ansible/roles/grafana/tasks/precheck.yml b/ansible/roles/grafana/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/grafana/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/haproxy/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2
index 466e85877..89b7997c6 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -603,7 +603,7 @@ listen mistral_api_external
{% endif %}
{% endif %}
-# (NOTE): This defaults section deletes forwardfor as recomended by:
+# (NOTE): This defaults section deletes forwardfor as recommended by:
# https://marc.info/?l=haproxy&m=141684110710132&w=1
defaults
diff --git a/ansible/roles/heat/tasks/config.yml b/ansible/roles/heat/tasks/config.yml
index 41b9effaf..dca462a50 100644
--- a/ansible/roles/heat/tasks/config.yml
+++ b/ansible/roles/heat/tasks/config.yml
@@ -42,3 +42,14 @@
- "heat-api"
- "heat-api-cfn"
- "heat-engine"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/heat/policy.json"
+ register: heat_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/heat/policy.json"
+ dest: "{{ node_config_directory }}/heat/policy.json"
+ when:
+ heat_policy.stat.exists
diff --git a/ansible/roles/heat/tasks/precheck.yml b/ansible/roles/heat/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/heat/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/horizon/tasks/precheck.yml b/ansible/roles/horizon/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/horizon/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/influxdb/tasks/precheck.yml b/ansible/roles/influxdb/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/influxdb/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/ironic/tasks/config.yml b/ansible/roles/ironic/tasks/config.yml
index 89ac3b51c..797b49482 100644
--- a/ansible/roles/ironic/tasks/config.yml
+++ b/ansible/roles/ironic/tasks/config.yml
@@ -37,3 +37,14 @@
- "ironic-api"
- "ironic-conductor"
- "ironic-inspector"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/ironic/policy.json"
+ register: ironic_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/ironic/policy.json"
+ dest: "{{ node_config_directory }}/ironic/policy.json"
+ when:
+ ironic_policy.stat.exists
diff --git a/ansible/roles/ironic/tasks/precheck.yml b/ansible/roles/ironic/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/ironic/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/iscsi/tasks/precheck.yml b/ansible/roles/iscsi/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/iscsi/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml
index e39e7d618..e531d6869 100644
--- a/ansible/roles/keystone/tasks/config.yml
+++ b/ansible/roles/keystone/tasks/config.yml
@@ -1,5 +1,5 @@
---
-- name: Check if Policies shall be overwritten
+- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/keystone/policy.json"
register: keystone_policy
diff --git a/ansible/roles/keystone/tasks/precheck.yml b/ansible/roles/keystone/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/keystone/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2
index e1bb125dc..a3f98173a 100644
--- a/ansible/roles/keystone/templates/wsgi-keystone.conf.j2
+++ b/ansible/roles/keystone/templates/wsgi-keystone.conf.j2
@@ -4,7 +4,7 @@ Listen {{ api_interface_address }}:{{ keystone_public_port }}
Listen {{ api_interface_address }}:{{ keystone_admin_port }}
<VirtualHost *:{{ keystone_public_port }}>
- WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
+ WSGIDaemonProcess keystone-public processes={{ openstack_service_workers }} threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /var/www/cgi-bin/keystone/main
WSGIApplicationGroup %{GLOBAL}
@@ -18,7 +18,7 @@ Listen {{ api_interface_address }}:{{ keystone_admin_port }}
</VirtualHost>
<VirtualHost *:{{ keystone_admin_port }}>
- WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
+ WSGIDaemonProcess keystone-admin processes={{ openstack_service_workers }} threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /var/www/cgi-bin/keystone/admin
WSGIApplicationGroup %{GLOBAL}
diff --git a/ansible/roles/kibana/tasks/precheck.yml b/ansible/roles/kibana/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/kibana/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/kuryr/tasks/config.yml b/ansible/roles/kuryr/tasks/config.yml
index 8b31c7ab1..001793780 100644
--- a/ansible/roles/kuryr/tasks/config.yml
+++ b/ansible/roles/kuryr/tasks/config.yml
@@ -23,3 +23,14 @@
template:
src: "kuryr.spec.j2"
dest: "{{ node_config_directory }}/kuryr/kuryr.spec"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/kuryr/policy.json"
+ register: kuryr_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/kuryr/policy.json"
+ dest: "{{ node_config_directory }}/kuryr/policy.json"
+ when:
+ kuryr_policy.stat.exists
diff --git a/ansible/roles/kuryr/tasks/precheck.yml b/ansible/roles/kuryr/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/kuryr/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/magnum/tasks/config.yml b/ansible/roles/magnum/tasks/config.yml
index 183b6bb43..5baa4a6ca 100644
--- a/ansible/roles/magnum/tasks/config.yml
+++ b/ansible/roles/magnum/tasks/config.yml
@@ -32,3 +32,14 @@
with_items:
- "magnum-api"
- "magnum-conductor"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/magnum/policy.json"
+ register: magnum_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/magnum/policy.json"
+ dest: "{{ node_config_directory }}/magnum/policy.json"
+ when:
+ magnum_policy.stat.exists
diff --git a/ansible/roles/magnum/tasks/precheck.yml b/ansible/roles/magnum/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/magnum/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/magnum/templates/magnum.conf.j2 b/ansible/roles/magnum/templates/magnum.conf.j2
index 7deb2b1e4..e567d3239 100644
--- a/ansible/roles/magnum/templates/magnum.conf.j2
+++ b/ansible/roles/magnum/templates/magnum.conf.j2
@@ -29,8 +29,8 @@ region_name = {{ openstack_region_name }}
[keystone_auth]
auth_url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3
-user_domain_id = default
-project_domain_id = default
+user_domain_name = Default
+project_domain_name = Default
project_name = service
password = {{ magnum_keystone_password }}
username = {{ magnum_keystone_user }}
@@ -41,8 +41,8 @@ auth_version = v3
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}/v3
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
auth_type = password
-project_domain_id = default
-user_domain_id = default
+project_domain_name = Default
+user_domain_name = Default
project_name = service
username = {{ magnum_keystone_user }}
password = {{ magnum_keystone_password }}
diff --git a/ansible/roles/manila/defaults/main.yml b/ansible/roles/manila/defaults/main.yml
index 05d7b833a..2ba966595 100644
--- a/ansible/roles/manila/defaults/main.yml
+++ b/ansible/roles/manila/defaults/main.yml
@@ -24,6 +24,9 @@ manila_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ dock
manila_api_tag: "{{ openstack_release }}"
manila_api_image_full: "{{ manila_api_image }}:{{ manila_api_tag }}"
+manila_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-data"
+manila_data_tag: "{{ openstack_release }}"
+manila_data_image_full: "{{ manila_data_image }}:{{ manila_data_tag }}"
#####################
## OpenStack
diff --git a/ansible/roles/manila/tasks/config.yml b/ansible/roles/manila/tasks/config.yml
index 4f83ff55b..5e03b4d47 100644
--- a/ansible/roles/manila/tasks/config.yml
+++ b/ansible/roles/manila/tasks/config.yml
@@ -6,6 +6,7 @@
recurse: yes
with_items:
- "manila-api"
+ - "manila-data"
- "manila-scheduler"
- "manila-share"
@@ -15,6 +16,7 @@
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "manila-api"
+ - "manila-data"
- "manila-scheduler"
- "manila-share"
@@ -33,6 +35,7 @@
dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
with_items:
- "manila-api"
+ - "manila-data"
- "manila-scheduler"
- name: Copying over manila-share.conf
@@ -52,3 +55,14 @@
dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
with_items:
- "manila-share"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/manila/policy.json"
+ register: manila_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/manila/policy.json"
+ dest: "{{ node_config_directory }}/manila/policy.json"
+ when:
+ manila_policy.stat.exists
diff --git a/ansible/roles/manila/tasks/deploy.yml b/ansible/roles/manila/tasks/deploy.yml
index c4e32b6e4..37135a409 100644
--- a/ansible/roles/manila/tasks/deploy.yml
+++ b/ansible/roles/manila/tasks/deploy.yml
@@ -4,6 +4,7 @@
- include: config.yml
when: inventory_hostname in groups['manila-api'] or
+ inventory_hostname in groups['manila-data'] or
inventory_hostname in groups['manila-share'] or
inventory_hostname in groups['manila-scheduler']
@@ -12,5 +13,6 @@
- include: start.yml
when: inventory_hostname in groups['manila-api'] or
+ inventory_hostname in groups['manila-data'] or
inventory_hostname in groups['manila-share'] or
inventory_hostname in groups['manila-scheduler']
diff --git a/ansible/roles/manila/tasks/precheck.yml b/ansible/roles/manila/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/manila/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/manila/tasks/pull.yml b/ansible/roles/manila/tasks/pull.yml
index 608646f69..520e29c08 100644
--- a/ansible/roles/manila/tasks/pull.yml
+++ b/ansible/roles/manila/tasks/pull.yml
@@ -19,3 +19,10 @@
common_options: "{{ docker_common_options }}"
image: "{{ manila_share_image_full }}"
when: inventory_hostname in groups['manila-share']
+
+- name: Pulling manila-data image
+ kolla_docker:
+ action: "pull_image"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ manila_data_image_full }}"
+ when: inventory_hostname in groups['manila-data']
diff --git a/ansible/roles/manila/tasks/reconfigure.yml b/ansible/roles/manila/tasks/reconfigure.yml
index 3c265fb0d..90ab18104 100644
--- a/ansible/roles/manila/tasks/reconfigure.yml
+++ b/ansible/roles/manila/tasks/reconfigure.yml
@@ -8,6 +8,7 @@
when: inventory_hostname in groups[item.group]
with_items:
- { name: manila_api, group: manila-api }
+ - { name: manila_data, group: manila-data }
- { name: manila_scheduler, group: manila-scheduler }
- { name: manila_share, group: manila-share }
@@ -21,6 +22,7 @@
when: inventory_hostname in groups[item.group]
with_items:
- { name: manila_api, group: manila-api }
+ - { name: manila_data, group: manila-data }
- { name: manila_scheduler, group: manila-scheduler }
- { name: manila_share, group: manila-share }
@@ -35,6 +37,7 @@
when: inventory_hostname in groups[item.group]
with_items:
- { name: manila_api, group: manila-api }
+ - { name: manila_data, group: manila-data }
- { name: manila_scheduler, group: manila-scheduler }
- { name: manila_share, group: manila-share }
@@ -49,6 +52,7 @@
- item[2]['rc'] == 1
with_together:
- [{ name: manila_api, group: manila-api },
+ { name: manila_data, group: manila-data },
{ name: manila_scheduler, group: manila-scheduler },
{ name: manila_share, group: manila-share }]
- "{{ container_envs.results }}"
@@ -68,6 +72,7 @@
- item[2]['rc'] == 1
with_together:
- [{ name: manila_api, group: manila-api },
+ { name: manila_data, group: manila-data },
{ name: manila_scheduler, group: manila-scheduler },
{ name: manila_share, group: manila-share }]
- "{{ container_envs.results }}"
diff --git a/ansible/roles/manila/tasks/start.yml b/ansible/roles/manila/tasks/start.yml
index 7adaff712..103b9f506 100644
--- a/ansible/roles/manila/tasks/start.yml
+++ b/ansible/roles/manila/tasks/start.yml
@@ -36,3 +36,17 @@
- "/run/:/run/:shared"
- "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['manila-share']
+
+- name: Starting manila-data container
+ kolla_docker:
+ action: "start_container"
+ common_options: "{{ docker_common_options }}"
+ name: "manila_data"
+ image: "{{ manila_data_image_full }}"
+ privileged: True
+ volumes:
+ - "{{ node_config_directory }}/manila-data/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/run/:/run/:shared"
+ - "kolla_logs:/var/log/kolla/"
+ when: inventory_hostname in groups['manila-data']
diff --git a/ansible/roles/manila/templates/manila-data.json.j2 b/ansible/roles/manila/templates/manila-data.json.j2
new file mode 100644
index 000000000..b5a8ce2bb
--- /dev/null
+++ b/ansible/roles/manila/templates/manila-data.json.j2
@@ -0,0 +1,18 @@
+{
+ "command": "manila-data --config-file /etc/manila/manila.conf",
+ "config_files": [
+ {
+ "source": "{{ container_config_directory }}/manila.conf",
+ "dest": "/etc/manila/manila.conf",
+ "owner": "manila",
+ "perm": "0600"
+ }
+ ],
+ "permissions": [
+ {
+ "path": "/var/log/kolla/manila",
+ "owner": "manila:manila",
+ "recurse": true
+ }
+ ]
+}
diff --git a/ansible/roles/mariadb/tasks/precheck.yml b/ansible/roles/mariadb/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/mariadb/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/mariadb/templates/galera.cnf.j2 b/ansible/roles/mariadb/templates/galera.cnf.j2
index 3d7eb938e..d74c74f29 100644
--- a/ansible/roles/mariadb/templates/galera.cnf.j2
+++ b/ansible/roles/mariadb/templates/galera.cnf.j2
@@ -43,5 +43,15 @@ wsrep_notify_cmd=/usr/local/bin/wsrep-notify.sh
max_connections=10000
+key_buffer_size = '64M'
+max_heap_table_size = '64M'
+tmp_table_size = '64M'
+{% set dynamic_pool_size_mb = (hostvars[inventory_hostname]['ansible_memtotal_mb'] * 0.4) | round | int %}
+{% if dynamic_pool_size_mb < 8192 %}
+innodb_buffer_pool_size = '{{ dynamic_pool_size_mb }}M'
+{% else %}
+innodb_buffer_pool_size = '8192M'
+{% endif %}
+
[server]
pid-file=/var/lib/mysql/mariadb.pid
diff --git a/ansible/roles/memcached/defaults/main.yml b/ansible/roles/memcached/defaults/main.yml
index 9c219d4fb..8377b77d4 100644
--- a/ansible/roles/memcached/defaults/main.yml
+++ b/ansible/roles/memcached/defaults/main.yml
@@ -7,3 +7,8 @@ project_name: "memcached"
memcached_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-memcached"
memcached_tag: "{{ openstack_release }}"
memcached_image_full: "{{ memcached_image }}:{{ memcached_tag }}"
+
+####################
+# Memcached options
+####################
+memcached_connection_limit: "5000"
diff --git a/ansible/roles/memcached/tasks/precheck.yml b/ansible/roles/memcached/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/memcached/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/memcached/templates/memcached.json.j2 b/ansible/roles/memcached/templates/memcached.json.j2
index 2e471c0c8..dcad615a6 100644
--- a/ansible/roles/memcached/templates/memcached.json.j2
+++ b/ansible/roles/memcached/templates/memcached.json.j2
@@ -1,3 +1,4 @@
{
- "command": "/usr/bin/memcached -vv -l {{ api_interface_address }} -p {{ memcached_port }}"
+ "command": "/usr/bin/memcached -vv -l {{ api_interface_address }} -p {{ memcached_port }} -c {{ memcached_connection_limit }}",
+ "config_files": []
}
diff --git a/ansible/roles/mistral/tasks/config.yml b/ansible/roles/mistral/tasks/config.yml
index 8c6d0d616..723074eac 100644
--- a/ansible/roles/mistral/tasks/config.yml
+++ b/ansible/roles/mistral/tasks/config.yml
@@ -35,3 +35,14 @@
- "mistral-api"
- "mistral-engine"
- "mistral-executor"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/mistral/policy.json"
+ register: mistral_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/mistral/policy.json"
+ dest: "{{ node_config_directory }}/mistral/policy.json"
+ when:
+ mistral_policy.stat.exists
diff --git a/ansible/roles/mistral/tasks/precheck.yml b/ansible/roles/mistral/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/mistral/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/mongodb/tasks/precheck.yml b/ansible/roles/mongodb/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/mongodb/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/multipathd/tasks/precheck.yml b/ansible/roles/multipathd/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/multipathd/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/murano/tasks/config.yml b/ansible/roles/murano/tasks/config.yml
index a544a4a08..779c277d5 100644
--- a/ansible/roles/murano/tasks/config.yml
+++ b/ansible/roles/murano/tasks/config.yml
@@ -32,3 +32,14 @@
with_items:
- "murano-api"
- "murano-engine"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/murano/policy.json"
+ register: murano_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/murano/policy.json"
+ dest: "{{ node_config_directory }}/murano/policy.json"
+ when:
+ murano_policy.stat.exists
diff --git a/ansible/roles/murano/tasks/precheck.yml b/ansible/roles/murano/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/murano/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/murano/templates/murano.conf.j2 b/ansible/roles/murano/templates/murano.conf.j2
index 7b0cfd408..5e95df866 100644
--- a/ansible/roles/murano/templates/murano.conf.j2
+++ b/ansible/roles/murano/templates/murano.conf.j2
@@ -11,7 +11,7 @@ bind_port = {{ murano_api_port }}
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[engine]
-workers = {{ openstack_service_workers }}
+engine_workers = {{ openstack_service_workers }}
[database]
connection = mysql+pymysql://{{ murano_database_user }}:{{ murano_database_password }}@{{ murano_database_address }}/{{ murano_database_name }}
@@ -36,6 +36,7 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
[murano]
url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ murano_api_port }}
+api_workers = {{ openstack_service_workers }}
[oslo_messaging_notifications]
diff --git a/ansible/roles/neutron/tasks/config.yml b/ansible/roles/neutron/tasks/config.yml
index 1c7d0238b..82921cd96 100644
--- a/ansible/roles/neutron/tasks/config.yml
+++ b/ansible/roles/neutron/tasks/config.yml
@@ -183,3 +183,14 @@
dest: "{{ node_config_directory }}/{{ item }}/vpnaas_agent.ini"
with_items:
- "neutron-vpnaas-agent"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/neutron/policy.json"
+ register: neutron_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/neutron/policy.json"
+ dest: "{{ node_config_directory }}/neutron/policy.json"
+ when:
+ neutron_policy.stat.exists
diff --git a/ansible/roles/neutron/tasks/precheck.yml b/ansible/roles/neutron/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/neutron/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/nova/tasks/config.yml b/ansible/roles/nova/tasks/config.yml
index 884163570..b8750b930 100644
--- a/ansible/roles/nova/tasks/config.yml
+++ b/ansible/roles/nova/tasks/config.yml
@@ -83,3 +83,14 @@
- { src: "id_rsa", dest: "id_rsa" }
- { src: "id_rsa.pub", dest: "id_rsa.pub" }
- { src: "ssh_config.j2", dest: "ssh_config" }
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/nova/policy.json"
+ register: nova_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/nova/policy.json"
+ dest: "{{ node_config_directory }}/nova/policy.json"
+ when:
+ nova_policy.stat.exists
diff --git a/ansible/roles/nova/tasks/precheck.yml b/ansible/roles/nova/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/nova/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml
index 9ed04e591..7aa1e0d67 100644
--- a/ansible/roles/prechecks/tasks/port_checks.yml
+++ b/ansible/roles/prechecks/tasks/port_checks.yml
@@ -1,4 +1,38 @@
---
+- name: Checking the api_interface is present
+ fail: "msg='Please check the api_interface property - interface {{ api_interface }} not found'"
+ when: api_interface not in ansible_interfaces
+
+- name: Checking the api_interface is active
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['active'] != True
+
+- name: Checking the api_interface configuration
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} configuration missing'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4'] is not defined
+
+- name: Checking the api_interface ip address configuration
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} ip address problem'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] is not defined
+
+- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node
+ command: ping -c 3 {{ item }}
+ register: ping_output
+ changed_when: false
+ with_items:
+ - "{{ kolla_internal_vip_address }}"
+ - "{{ kolla_external_vip_address }}"
+ failed_when: ping_output.rc != 1
+ when: enable_haproxy | bool
+
+- name: Checking if kolla_internal_vip_address is in the same network as api_interface on all nodes
+ command: ip -4 -o addr show dev {{ api_interface }}
+ register: ip_addr_output
+ changed_when: false
+ failed_when: "'169.254.' not in kolla_internal_vip_address and \
+ kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
+ when: enable_haproxy | bool
+
- name: Checking free port for Aodh API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
@@ -895,37 +929,3 @@
when:
- inventory_hostname in groups['haproxy']
- enable_searchlight | bool
-
-- name: Checking the network_interface is present
- fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'"
- when: network_interface not in ansible_interfaces
-
-- name: Checking the network_interface is active
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True
-
-- name: Checking the network_interface configuration
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined
-
-- name: Checking the network_interface ip address configuration
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined
-
-- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node
- command: ping -c 3 {{ item }}
- register: ping_output
- changed_when: false
- with_items:
- - "{{ kolla_internal_vip_address }}"
- - "{{ kolla_external_vip_address }}"
- failed_when: ping_output.rc != 1
- when: enable_haproxy | bool
-
-- name: Checking if kolla_internal_vip_address is in the same network as network_interface on all nodes
- command: ip -4 -o addr show dev {{ network_interface }}
- register: ip_addr_output
- changed_when: false
- failed_when: "'169.254.' not in kolla_internal_vip_address and \
- kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
- when: enable_haproxy | bool
diff --git a/ansible/roles/prechecks/tasks/precheck.yml b/ansible/roles/prechecks/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/prechecks/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/rabbitmq/tasks/precheck.yml b/ansible/roles/rabbitmq/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/rabbitmq/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/rally/tasks/config.yml b/ansible/roles/rally/tasks/config.yml
index c210dc338..3304915de 100644
--- a/ansible/roles/rally/tasks/config.yml
+++ b/ansible/roles/rally/tasks/config.yml
@@ -24,3 +24,14 @@
dest: "{{ node_config_directory }}/{{ item }}/rally.conf"
with_items:
- "rally"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/rally/policy.json"
+ register: rally_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/rally/policy.json"
+ dest: "{{ node_config_directory }}/rally/policy.json"
+ when:
+ rally_policy.stat.exists
diff --git a/ansible/roles/rally/tasks/precheck.yml b/ansible/roles/rally/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/rally/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/sahara/tasks/config.yml b/ansible/roles/sahara/tasks/config.yml
index b3a3405cc..a83df50ca 100644
--- a/ansible/roles/sahara/tasks/config.yml
+++ b/ansible/roles/sahara/tasks/config.yml
@@ -32,3 +32,14 @@
with_items:
- "sahara-api"
- "sahara-engine"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/sahara/policy.json"
+ register: sahara_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/sahara/policy.json"
+ dest: "{{ node_config_directory }}/sahara/policy.json"
+ when:
+ sahara_policy.stat.exists
diff --git a/ansible/roles/sahara/tasks/precheck.yml b/ansible/roles/sahara/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/sahara/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/searchlight/tasks/config.yml b/ansible/roles/searchlight/tasks/config.yml
index b31b1d81e..4237b6bdd 100644
--- a/ansible/roles/searchlight/tasks/config.yml
+++ b/ansible/roles/searchlight/tasks/config.yml
@@ -30,3 +30,14 @@
with_items:
- "searchlight-api"
- "searchlight-listener"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/searchlight/policy.json"
+ register: searchlight_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/searchlight/policy.json"
+ dest: "{{ node_config_directory }}/searchlight/policy.json"
+ when:
+ searchlight_policy.stat.exists
diff --git a/ansible/roles/searchlight/tasks/precheck.yml b/ansible/roles/searchlight/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/searchlight/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/senlin/tasks/config.yml b/ansible/roles/senlin/tasks/config.yml
index fa714f550..17ff0f83a 100644
--- a/ansible/roles/senlin/tasks/config.yml
+++ b/ansible/roles/senlin/tasks/config.yml
@@ -32,3 +32,14 @@
with_items:
- "senlin-api"
- "senlin-engine"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/senlin/policy.json"
+ register: senlin_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/senlin/policy.json"
+ dest: "{{ node_config_directory }}/senlin/policy.json"
+ when:
+ senlin_policy.stat.exists
diff --git a/ansible/roles/senlin/tasks/precheck.yml b/ansible/roles/senlin/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/senlin/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/swift/tasks/config.yml b/ansible/roles/swift/tasks/config.yml
index dc04ffaff..10c26de5a 100644
--- a/ansible/roles/swift/tasks/config.yml
+++ b/ansible/roles/swift/tasks/config.yml
@@ -152,3 +152,14 @@
- "container.ring.gz"
- "object.builder"
- "object.ring.gz"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/swift/policy.json"
+ register: swift_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/swift/policy.json"
+ dest: "{{ node_config_directory }}/swift/policy.json"
+ when:
+ swift_policy.stat.exists
diff --git a/ansible/roles/swift/tasks/precheck.yml b/ansible/roles/swift/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/swift/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/swift/templates/object.conf.j2 b/ansible/roles/swift/templates/object.conf.j2
index ae4f08fd5..bd8b25fa9 100644
--- a/ansible/roles/swift/templates/object.conf.j2
+++ b/ansible/roles/swift/templates/object.conf.j2
@@ -23,8 +23,8 @@ use = egg:swift#object
[object-auditor]
{% endif %}
-{% if service_name == 'swift-object-replicator' %}
[object-replicator]
+{% if service_name == 'swift-object-replicator' %}
sync_module = {replication_ip}:{meta}:object
{% endif %}
diff --git a/ansible/roles/telegraf/tasks/precheck.yml b/ansible/roles/telegraf/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/telegraf/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/telegraf/tasks/start.yml b/ansible/roles/telegraf/tasks/start.yml
index 443b07249..b50cec453 100644
--- a/ansible/roles/telegraf/tasks/start.yml
+++ b/ansible/roles/telegraf/tasks/start.yml
@@ -15,5 +15,4 @@
- "/sys:/rootfs/sys:ro"
- "/proc:/rootfs/proc:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- - "haproxy_socket:/var/lib/kolla/haproxy/:rw"
pid_mode: "host"
diff --git a/ansible/roles/telegraf/templates/telegraf.conf.j2 b/ansible/roles/telegraf/templates/telegraf.conf.j2
index 457afa021..1f81ad91c 100644
--- a/ansible/roles/telegraf/templates/telegraf.conf.j2
+++ b/ansible/roles/telegraf/templates/telegraf.conf.j2
@@ -17,8 +17,6 @@
retention_policy = "default"
write_consistency = "any"
timeout = "5s"
-[[inputs.filestat]]
-files = ["/var/log/kolla/**.log"]
[[inputs.cpu]]
percpu = true
totalcpu = true
diff --git a/ansible/roles/tempest/tasks/config.yml b/ansible/roles/tempest/tasks/config.yml
index 3375790f9..6422270d3 100644
--- a/ansible/roles/tempest/tasks/config.yml
+++ b/ansible/roles/tempest/tasks/config.yml
@@ -24,3 +24,14 @@
dest: "{{ node_config_directory }}/{{ item }}/tempest.conf"
with_items:
- "tempest"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/tempest/policy.json"
+ register: tempest_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/tempest/policy.json"
+ dest: "{{ node_config_directory }}/tempest/policy.json"
+ when:
+ tempest_policy.stat.exists
diff --git a/ansible/roles/tempest/tasks/precheck.yml b/ansible/roles/tempest/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/tempest/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/vmtp/tasks/precheck.yml b/ansible/roles/vmtp/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/vmtp/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/roles/watcher/tasks/config.yml b/ansible/roles/watcher/tasks/config.yml
index 5116c3ebb..9d4ae9f7a 100644
--- a/ansible/roles/watcher/tasks/config.yml
+++ b/ansible/roles/watcher/tasks/config.yml
@@ -35,3 +35,14 @@
- "watcher-api"
- "watcher-engine"
- "watcher-applier"
+
+- name: Check if policies shall be overwritten
+ local_action: stat path="{{ node_custom_config }}/watcher/policy.json"
+ register: watcher_policy
+
+- name: Copying over existing policy.json
+ template:
+ src: "{{ node_custom_config }}/watcher/policy.json"
+ dest: "{{ node_config_directory }}/watcher/policy.json"
+ when:
+ watcher_policy.stat.exists
diff --git a/ansible/roles/watcher/tasks/precheck.yml b/ansible/roles/watcher/tasks/precheck.yml
new file mode 100644
index 000000000..ed97d539c
--- /dev/null
+++ b/ansible/roles/watcher/tasks/precheck.yml
@@ -0,0 +1 @@
+---
diff --git a/ansible/site.yml b/ansible/site.yml
index c0151eeff..49f6f89d1 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -14,6 +14,12 @@
tags: always
- hosts:
+ - all
+ roles:
+ - role: prechecks
+ when: action == "precheck"
+
+- hosts:
- ceph-mon
- ceph-osd
- ceph-rgw
@@ -265,6 +271,7 @@
- hosts:
- manila-api
+ - manila-data
- manila-share
- manila-scheduler
serial: '{{ serial|default("0") }}'