summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/dashboard/tasks/main.yml3
-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/heat/tasks/heat_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml2
-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
19 files changed, 46 insertions, 17 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/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index 5afcb157..ea9b829b 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)
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/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/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'] }}"