summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-22 16:59:08 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-26 17:54:43 +0800
commit6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (patch)
treea78a15b915741bb3ef7ddd4a61a801dd9f46d577 /deploy/adapters/ansible/roles
parenta9041dbf7b68f56169e82de3c37601b7e86867b0 (diff)
Update ansible version
JIRA: COMPASS-511 Change-Id: Id0e83c65a08c9f9036b5d3a597b905e8a7bde6e8 Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/aodh/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/aodh/tasks/aodh_install.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/apache/handlers/main.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/apache/tasks/main.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/boot-recovery/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_config.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/handlers/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_config.yml2
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml8
-rw-r--r--deploy/adapters/ansible/roles/compute-recovery/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/controller-recovery/tasks/main.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/dashboard/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_config.yml13
-rwxr-xr-xdeploy/adapters/ansible/roles/database/tasks/mongodb_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/ext-network/tasks/main.yml1
-rw-r--r--deploy/adapters/ansible/roles/glance/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml2
-rw-r--r--deploy/adapters/ansible/roles/ha/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/heat/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/heat/tasks/heat_install.yml6
-rwxr-xr-xdeploy/adapters/ansible/roles/keystone/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml4
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml33
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/keystone/vars/main.yml27
-rwxr-xr-xdeploy/adapters/ansible/roles/memcached/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/memcached/tasks/main.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/mq/tasks/rabbitmq_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/neutron-compute/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml6
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml4
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/handlers/main.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/tasks/igmp-router.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/tasks/main.yml16
-rwxr-xr-xdeploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml2
-rw-r--r--deploy/adapters/ansible/roles/neutron-network/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/nova-compute/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/nova-compute/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/nova-controller/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml3
-rw-r--r--deploy/adapters/ansible/roles/secgroup/handlers/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/secgroup/tasks/secgroup.yml15
-rw-r--r--deploy/adapters/ansible/roles/setup-network/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/roles/setup-network/templates/network.cfg8
-rwxr-xr-xdeploy/adapters/ansible/roles/storage/tasks/loop.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/storage/tasks/main.yml4
60 files changed, 165 insertions, 111 deletions
diff --git a/deploy/adapters/ansible/roles/aodh/handlers/main.yml b/deploy/adapters/ansible/roles/aodh/handlers/main.yml
index b3399e0c..a652ea4b 100644
--- a/deploy/adapters/ansible/roles/aodh/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/aodh/handlers/main.yml
@@ -9,5 +9,5 @@
---
- name: restart aodh services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/aodh/tasks/aodh_install.yml b/deploy/adapters/ansible/roles/aodh/tasks/aodh_install.yml
index d8a82270..4b86f7fd 100644
--- a/deploy/adapters/ansible/roles/aodh/tasks/aodh_install.yml
+++ b/deploy/adapters/ansible/roles/aodh/tasks/aodh_install.yml
@@ -11,7 +11,7 @@
- name: install aodh packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: update aodh conf
template: src={{ item }} dest=/etc/aodh/aodh.conf backup=yes
@@ -22,7 +22,7 @@
- name: write services to monitor list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: remove default sqlite db
shell: rm /var/lib/aodh/aodh.sqlite || touch aodh.sqllite.db.removed
diff --git a/deploy/adapters/ansible/roles/apache/handlers/main.yml b/deploy/adapters/ansible/roles/apache/handlers/main.yml
index 0f28dc24..53e600dd 100755
--- a/deploy/adapters/ansible/roles/apache/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/apache/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart apache related services
service: name={{ item }} state=restarted enabled=yes
- with_items: services| union(services_noarch)
+ with_items: "{{ services| union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/apache/tasks/main.yml b/deploy/adapters/ansible/roles/apache/tasks/main.yml
index 7053229a..f87633a6 100755
--- a/deploy/adapters/ansible/roles/apache/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/apache/tasks/main.yml
@@ -11,7 +11,7 @@
- name: install packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: assure listen port exist
template:
diff --git a/deploy/adapters/ansible/roles/boot-recovery/tasks/main.yml b/deploy/adapters/ansible/roles/boot-recovery/tasks/main.yml
index 67206bf6..695779f7 100755
--- a/deploy/adapters/ansible/roles/boot-recovery/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/boot-recovery/tasks/main.yml
@@ -19,7 +19,7 @@
- name: stop controller services
service: name={{ item }} state=stopped enabled=yes
- with_items: controller_services | union(controller_services_noarch)
+ with_items: "{{ controller_services | union(controller_services_noarch) }}"
when: RECOVERY_ENV
tags:
- recovery-stop-service
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml b/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml
index 10b7c683..78178130 100644
--- a/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_compute/handlers/main.yml
@@ -9,8 +9,8 @@
---
- name: restart ceilometer service
service: name={{ item }} state=restarted enabled=yes
- with_items: ceilometer_services
+ with_items: "{{ ceilometer_services }}"
- name: restart nova service
service: name={{ item }} state=restarted enabled=yes
- with_items: nova_services
+ with_items: "{{ nova_services }}"
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_config.yml b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_config.yml
index b429d65b..9b487def 100644
--- a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_config.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_config.yml
@@ -31,7 +31,7 @@
- name: write services to monitor list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: ceilometer_services
+ with_items: "{{ ceilometer_services }}"
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_install.yml b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_install.yml
index 0f2ba3d2..b1d86f8d 100644
--- a/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_install.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_compute/tasks/ceilometer_install.yml
@@ -18,7 +18,7 @@
- name: install ceilometer packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: ceilometer_packages | union(packages_noarch)
+ with_items: "{{ ceilometer_packages | union(packages_noarch) }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/handlers/main.yml b/deploy/adapters/ansible/roles/ceilometer_controller/handlers/main.yml
index a3bfb85d..1507c6e9 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/handlers/main.yml
@@ -9,11 +9,11 @@
---
- name: restart ceilometer service
service: name={{ item }} state=restarted enabled=yes
- with_items: ceilometer_services
+ with_items: "{{ ceilometer_services }}"
- name: restart glance_cinder service
service: name={{ item }} state=restarted enabled=yes
- with_items: glance_cinder_services
+ with_items: "{{ glance_cinder_services }}"
- name: reload apache server
service: name=apache2 state=reloaded
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_config.yml b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_config.yml
index 7f5209c1..694cc0dd 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_config.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_config.yml
@@ -66,6 +66,6 @@
- name: write services to monitor list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: ceilometer_services
+ with_items: "{{ ceilometer_services }}"
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_install.yml b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_install.yml
index 0f2ba3d2..b1d86f8d 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_install.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/ceilometer_install.yml
@@ -18,7 +18,7 @@
- name: install ceilometer packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: ceilometer_packages | union(packages_noarch)
+ with_items: "{{ ceilometer_packages | union(packages_noarch) }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml b/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml
index 93bffe79..541bf8d5 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-controller/handlers/main.yml
@@ -9,5 +9,5 @@
---
- name: restart cinder control serveice
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
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 d41094da..0a0d57f3 100644
--- a/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml
+++ b/deploy/adapters/ansible/roles/cinder-controller/tasks/cinder_install.yml
@@ -16,7 +16,7 @@
- name: install cinder packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -26,7 +26,7 @@
- name: generate common cinder service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: upload cinder conf
template: src=cinder.conf dest=/etc/cinder/cinder.conf
diff --git a/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml b/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml
index f841a63a..c7ec8d8e 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-volume/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart cinder-volume services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
index f3f40c12..29256d9c 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
@@ -18,7 +18,7 @@
- name: install cinder-volume and lvm2 packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -28,7 +28,7 @@
- name: generate cinder volume service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: upload cinder-volume configuration
template: src=cinder.conf dest=/etc/cinder/cinder.conf
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index 1fa0de84..0e19c004 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -41,7 +41,7 @@
- name: install packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: make config template dir exist
file: path=/opt/os_templates state=directory mode=0755
@@ -57,7 +57,7 @@
- name: install pip packages
pip: name={{ item }} state=present extra_args='--pre'
- with_items: pip_packages
+ with_items: "{{ pip_packages }}"
- name: install keyczar for accelerate
pip: name=python-keyczar state=present extra_args='--pre'
@@ -82,11 +82,11 @@
- name: restart services
service: name={{ item }} state=restarted enabled=yes
- with_items: services| union(services_noarch)
+ 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)
+ with_items: "{{ services| union(services_noarch) }}"
- name: kill daemon for accelerate
shell: lsof -ni :5099|grep LISTEN|awk '{print $2}'|xargs kill -9
diff --git a/deploy/adapters/ansible/roles/compute-recovery/tasks/main.yml b/deploy/adapters/ansible/roles/compute-recovery/tasks/main.yml
index b333b9e0..e67d0088 100644
--- a/deploy/adapters/ansible/roles/compute-recovery/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/compute-recovery/tasks/main.yml
@@ -19,7 +19,7 @@
- name: restart compute services
service: name={{ item }} state=restarted enabled=yes
- with_items: compute_services | union(compute_services_noarch)
+ with_items: "{{ compute_services | union(compute_services_noarch) }}"
when: RECOVERY_ENV
tags:
- recovery
diff --git a/deploy/adapters/ansible/roles/controller-recovery/tasks/main.yml b/deploy/adapters/ansible/roles/controller-recovery/tasks/main.yml
index ccf3e46b..c5d2e959 100644
--- a/deploy/adapters/ansible/roles/controller-recovery/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/controller-recovery/tasks/main.yml
@@ -19,7 +19,7 @@
- name: restart controller services
service: name={{ item }} state=restarted enabled=yes
- with_items: controller_services | union(controller_services_noarch)
+ with_items: "{{ controller_services | union(controller_services_noarch) }}"
when: RECOVERY_ENV
tags:
- recovery
diff --git a/deploy/adapters/ansible/roles/dashboard/handlers/main.yml b/deploy/adapters/ansible/roles/dashboard/handlers/main.yml
index 62e0b8e5..8e28bbf6 100755
--- a/deploy/adapters/ansible/roles/dashboard/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart dashboard services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ 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 9be6fd6c..4f8ccad0 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -18,7 +18,7 @@
- name: install dashboard packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
index 1b08172d..d1897173 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_install.yml
@@ -22,7 +22,7 @@
- name: install python-mysqldb
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: maridb_packages | union(packages_noarch)
+ with_items: "{{ maridb_packages | union(packages_noarch) }}"
- name: create conf dir for wsrep
file: path=/etc/my.cnf.d state=directory mode=0755
@@ -34,7 +34,7 @@
dest: '{{ item.dest }}'
backup: yes
mode: 0644
- with_items: mysql_config
+ with_items: "{{ mysql_config }}"
- name: bugfix for rsync version 3.1
lineinfile:
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
index 0a449f86..76aa5675 100755
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
@@ -36,9 +36,20 @@
- debug: msg='{{ servers.stdout |int }}'
+- name: Add admin user
+ mongodb_user:
+ login_host: "{{ internal_vip.ip }}"
+ database: admin
+ name: root
+ password: root
+ roles: 'root'
+ state: present
+
- name: create mongodb user and db
mongodb_user:
login_host: "{{ internal_vip.ip }}"
+ login_user: root
+ login_password: root
database: ceilometer
name: ceilometer
password: "{{ CEILOMETER_DBPASS }}"
@@ -48,6 +59,8 @@
- name: grant user privilege
mongodb_user:
login_host: "{{ internal_vip.ip }}"
+ login_user: root
+ login_password: root
database: ceilometer
name: ceilometer
password: "{{ CEILOMETER_DBPASS }}"
diff --git a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
index dea15a83..bac6c6eb 100755
--- a/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mongodb_install.yml
@@ -9,11 +9,11 @@
---
- name: install mongodb packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: mongodb_packages | union(packages_noarch)
+ with_items: "{{ mongodb_packages | union(packages_noarch) }}"
- name: install pymongod packages
pip: name={{ item }} state=present extra_args='--pre'
- with_items: pip_packages
+ with_items: "{{ pip_packages }}"
- name: copy ceilometer configs
template: src=mongodb.conf dest=/opt/os_templates backup=yes
diff --git a/deploy/adapters/ansible/roles/ext-network/tasks/main.yml b/deploy/adapters/ansible/roles/ext-network/tasks/main.yml
index f68105f1..10b33b5f 100644
--- a/deploy/adapters/ansible/roles/ext-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ext-network/tasks/main.yml
@@ -37,6 +37,7 @@
neutron subnet-create \
--name {{ public_net_info.subnet }} \
--gateway {{ public_net_info.external_gw }} \
+ --disable-dhcp \
--allocation-pool \
start={{ public_net_info.floating_ip_start }},end={{ public_net_info.floating_ip_end }} \
{{ public_net_info.network }} {{ public_net_info.floating_ip_cidr }}
diff --git a/deploy/adapters/ansible/roles/glance/handlers/main.yml b/deploy/adapters/ansible/roles/glance/handlers/main.yml
index 53ee01c1..22f31cea 100644
--- a/deploy/adapters/ansible/roles/glance/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/glance/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart glance services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
index a4783630..9c95546d 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
@@ -9,11 +9,11 @@
---
- name: install glance packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: generate glance service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: update glance conf
template: src={{ item }} dest=/etc/glance/{{ item }}
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index 39a49dc1..f0176c89 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -9,7 +9,7 @@
---
- name: install nfs packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: nfs_packages
+ with_items: "{{ nfs_packages }}"
- name: install nfs
local_action: yum name={{ item }} state=present
diff --git a/deploy/adapters/ansible/roles/ha/tasks/main.yml b/deploy/adapters/ansible/roles/ha/tasks/main.yml
index 1a4c8bad..e2f172e7 100644
--- a/deploy/adapters/ansible/roles/ha/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ha/tasks/main.yml
@@ -11,11 +11,11 @@
- name: install keepalived xinet haproxy
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: generate ha service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: install pexpect
pip: name=pexpect state=present extra_args='--pre'
diff --git a/deploy/adapters/ansible/roles/heat/handlers/main.yml b/deploy/adapters/ansible/roles/heat/handlers/main.yml
index 6cc567f0..77946a51 100644
--- a/deploy/adapters/ansible/roles/heat/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/heat/handlers/main.yml
@@ -9,7 +9,7 @@
---
- name: restart heat service
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: remove heat-sqlite-db
shell: rm /var/lib/heat/heat.sqlite || touch heat.sqlite.db.removed
diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
index 6a0f1c73..15334d40 100644
--- a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
+++ b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
@@ -11,13 +11,11 @@
- name: install heat related packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: generate heat service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
-
-# '
+ with_items: "{{ services | union(services_noarch) }}"
- name: create heat user domain
shell: >
diff --git a/deploy/adapters/ansible/roles/keystone/handlers/main.yml b/deploy/adapters/ansible/roles/keystone/handlers/main.yml
index 608a8a09..82c1a553 100755
--- a/deploy/adapters/ansible/roles/keystone/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/keystone/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart keystone services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
index ea211470..33892c5f 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
@@ -41,7 +41,7 @@
--delete \
/etc/keystone/fernet-keys \
root@{{ hostvars[ item ].ansible_eth0.ipv4.address }}:/etc/keystone/
- with_items: groups['controller'][1:]
+ with_items: "{{ groups['controller'][1:] }}"
notify:
- restart keystone services
@@ -74,7 +74,7 @@
--delete \
/etc/keystone/credential-keys \
root@{{ hostvars[ item ].ansible_eth0.ipv4.address }}:/etc/keystone/
- with_items: groups['controller'][1:]
+ with_items: "{{ groups['controller'][1:] }}"
notify:
- restart keystone services
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
index 53077776..ab71fab4 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
@@ -23,6 +23,10 @@
--url {{ item.adminurl }} \
$(openstack endpoint list | grep keystone | grep admin | awk '{print $2}');
with_items: "{{ os_services[0:1] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add service
shell:
@@ -32,12 +36,20 @@
--description "{{ item.description }}" \
{{ item.type }}
with_items: "{{ os_services[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add project
shell:
. /opt/admin-openrc.sh;
openstack project create --description "Service Project" service;
openstack project create --domain default --description "Demo Project" demo;
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: set admin user
shell:
@@ -50,6 +62,10 @@
{{ item.user }}
with_items: "{{ os_users }}"
when: item["user"] == "admin"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add user
shell:
@@ -61,6 +77,10 @@
--password "{{ item.password }}" \
{{ item.user }}
with_items: "{{ os_users[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add roles
shell:
@@ -68,6 +88,10 @@
openstack role create {{ item.role }}
with_items: "{{ os_users }}"
when: item["user"] == "demo"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: grant roles
shell:
@@ -77,6 +101,10 @@
--user "{{ item.user }}" \
{{ item.role }}
with_items: "{{ os_users }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add endpoints
shell:
@@ -91,3 +119,8 @@
--region {{ item.region }} \
{{ item.name }} admin {{ item.adminurl }};
with_items: "{{ os_services[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
+
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
index 757349c5..0d3161ed 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
@@ -18,7 +18,7 @@
- name: install keystone packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -38,7 +38,7 @@
- name: generate keystone service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: delete sqlite database
file:
diff --git a/deploy/adapters/ansible/roles/keystone/vars/main.yml b/deploy/adapters/ansible/roles/keystone/vars/main.yml
index ecaf7b51..916d6608 100644
--- a/deploy/adapters/ansible/roles/keystone/vars/main.yml
+++ b/deploy/adapters/ansible/roles/keystone/vars/main.yml
@@ -93,13 +93,13 @@ os_services:
internalurl: "http://{{ internal_vip.ip }}:8000/v1"
adminurl: "http://{{ internal_vip.ip }}:8000/v1"
- - name: congress
- type: policy
- region: RegionOne
- description: "OpenStack Policy Service"
- publicurl: "http://{{ public_vip.ip }}:1789"
- internalurl: "http://{{ internal_vip.ip }}:1789"
- adminurl: "http://{{ internal_vip.ip }}:1789"
+# - name: congress
+# type: policy
+# region: RegionOne
+# description: "OpenStack Policy Service"
+# publicurl: "http://{{ public_vip.ip }}:1789"
+# internalurl: "http://{{ internal_vip.ip }}:1789"
+# adminurl: "http://{{ internal_vip.ip }}:1789"
# - name: swift
# type: object-store
@@ -173,12 +173,12 @@ os_users:
tenant: service
tenant_description: "Service Tenant"
- - user: congress
- password: "{{ CONGRESS_PASS }}"
- email: congress@admin.com
- role: admin
- tenant: service
- tenant_description: "Service Tenant"
+# - user: congress
+# password: "{{ CONGRESS_PASS }}"
+# email: congress@admin.com
+# role: admin
+# tenant: service
+# tenant_description: "Service Tenant"
- user: demo
password: "{{ DEMO_PASS }}"
@@ -193,3 +193,4 @@ os_users:
# role: admin
# tenant: service
# tenant_description: "Service Tenant"
+
diff --git a/deploy/adapters/ansible/roles/memcached/handlers/main.yml b/deploy/adapters/ansible/roles/memcached/handlers/main.yml
index 4c3230c1..bcbcf8e0 100755
--- a/deploy/adapters/ansible/roles/memcached/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/memcached/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart memcahed services
service: name={{ item }} state=restarted enabled=yes
- with_items: services| union(services_noarch)
+ with_items: "{{ services| union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/memcached/tasks/main.yml b/deploy/adapters/ansible/roles/memcached/tasks/main.yml
index 99ee6e87..a4457f36 100644
--- a/deploy/adapters/ansible/roles/memcached/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/memcached/tasks/main.yml
@@ -18,7 +18,7 @@
- name: install packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_install.yml b/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_install.yml
index 1c8c2fe7..d6f7759e 100755
--- a/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_install.yml
+++ b/deploy/adapters/ansible/roles/mq/tasks/rabbitmq_install.yml
@@ -19,7 +19,7 @@
- name: install rabbitmq-server
action: "{{ ansible_pkg_mgr }} name=rabbitmq-server state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -88,4 +88,4 @@
- name: generate mq service list
shell: echo {{ item }} >> /opt/service
- with_items: services_noarch
+ with_items: "{{ services_noarch }}"
diff --git a/deploy/adapters/ansible/roles/neutron-compute/handlers/main.yml b/deploy/adapters/ansible/roles/neutron-compute/handlers/main.yml
index ca4e8088..83737980 100644
--- a/deploy/adapters/ansible/roles/neutron-compute/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-compute/handlers/main.yml
@@ -9,7 +9,7 @@
---
- name: restart neutron compute service
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: restart nova-compute services
service: name=nova-compute state=restarted enabled=yes
diff --git a/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
index 375e325d..3e58cc38 100644
--- a/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-compute/tasks/main.yml
@@ -30,7 +30,7 @@
- name: install compute-related neutron packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -52,7 +52,7 @@
- name: generate neutron compute service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: config ml2 plugin
template: src=templates/ml2_conf.ini
@@ -72,4 +72,4 @@
- meta: flush_handlers
- include: ../../neutron-network/tasks/odl.yml
- when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS }}"
+ when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS | to_json }}"
diff --git a/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml b/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
index 98d21135..8b1bf281 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
@@ -9,5 +9,5 @@
---
- name: restart neutron control services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
when: item != "neutron-server"
diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
index fd133f37..47345f7a 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
@@ -13,7 +13,7 @@
register: result
run_once: True
until: result.rc == 0
- retries: 5
- delay: 3
+ retries: 10
+ delay: 5
notify:
- restart neutron control services
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 917a8356..cc222224 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
@@ -18,7 +18,7 @@
- name: install controller-related neutron packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -28,7 +28,7 @@
- name: generate neutron control service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: get tenant id to fill neutron.conf
shell:
diff --git a/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml b/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml
index 9a9c9b4b..a279b5d5 100644
--- a/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/handlers/main.yml
@@ -10,8 +10,8 @@
- name: restart neutron network relation service
service: name={{ item }} state=restarted enabled=yes
with_flattened:
- - services_noarch
- - services
+ - "{{ services_noarch }}"
+ - "{{ services }}"
- name: restart openvswitch agent service
service: name=neutron-openvswitch-agent state=restarted enabled=yes
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml
index aec714f3..49b6a7f1 100755
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/firewall.yml
@@ -18,7 +18,7 @@
- name: install firewall packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: firewall_packages
+ with_items: "{{ firewall_packages }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/igmp-router.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/igmp-router.yml
index 2ce16510..ec12b318 100644
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/igmp-router.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/igmp-router.yml
@@ -9,7 +9,7 @@
---
- name: Install XORP to provide IGMP router functionality
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: xorp_packages
+ with_items: "{{ xorp_packages }}"
- name: create xorp directory
file: path=/etc/xorp state=directory
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
index 31f7f17c..753d281a 100644
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/main.yml
@@ -23,13 +23,13 @@
- name: assert kernel support for vxlan
command: modinfo -F version vxlan
- when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES }}"
+ when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES | to_json }}"
- name: assert iproute2 suppport for vxlan
command: ip link add type vxlan help
register: iproute_out
failed_when: iproute_out.rc == 255
- when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES }}"
+ when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES | to_json }}"
- name: disable auto start
copy:
@@ -40,7 +40,7 @@
- name: install neutron network related packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -50,7 +50,7 @@
- name: generate neutron network service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: fix openstack neutron plugin config file
shell: |
@@ -97,7 +97,7 @@
dest: /etc/neutron/dnsmasq-neutron.conf
regexp: '^dhcp-option-force'
line: 'dhcp-option-force=26,1450'
- when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES }}"
+ when: "'vxlan' in {{ NEUTRON_TUNNEL_TYPES | to_json }}"
- include: firewall.yml
when: enable_fwaas == True
@@ -106,12 +106,12 @@
when: enable_vpnaas == True
- include: odl.yml
- when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS }}"
+ when: "'opendaylight' in {{ NEUTRON_MECHANISM_DRIVERS | to_json }}"
- name: restart neutron network relation service
service: name={{ item }} state=restarted enabled=yes
with_flattened:
- - services_noarch
- - services
+ - "{{ services_noarch }}"
+ - "{{ services }}"
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml b/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml
index 9722ab7c..925eb709 100755
--- a/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/tasks/vpn.yml
@@ -18,7 +18,7 @@
- name: install vpn packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: vpn_packages
+ with_items: "{{ vpn_packages }}"
- name: enable auto start
file:
diff --git a/deploy/adapters/ansible/roles/neutron-network/vars/Debian.yml b/deploy/adapters/ansible/roles/neutron-network/vars/Debian.yml
index 1a78ca8c..3597f587 100644
--- a/deploy/adapters/ansible/roles/neutron-network/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/neutron-network/vars/Debian.yml
@@ -21,5 +21,9 @@ services:
openvswitch_agent: neutron-plugin-openvswitch-agent
+firewall_packages:
+
+vpn_packages:
+
xorp_packages:
- xorp
diff --git a/deploy/adapters/ansible/roles/nova-compute/handlers/main.yml b/deploy/adapters/ansible/roles/nova-compute/handlers/main.yml
index a50ce3d2..cbf0bc1c 100644
--- a/deploy/adapters/ansible/roles/nova-compute/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/nova-compute/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart nova-compute services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
index 16315b36..cdbb6472 100644
--- a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml
@@ -18,7 +18,7 @@
- name: install nova-compute related packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: restart virtlogd
service: name=virtlogd state=started enabled=yes
@@ -44,7 +44,7 @@
- name: generate neutron control service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
#'
- name: remove nova sqlite db
shell: rm /var/lib/nova/nova.sqlite || touch nova.sqlite.removed
diff --git a/deploy/adapters/ansible/roles/nova-controller/handlers/main.yml b/deploy/adapters/ansible/roles/nova-controller/handlers/main.yml
index 0e512a7c..259012c5 100644
--- a/deploy/adapters/ansible/roles/nova-controller/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/nova-controller/handlers/main.yml
@@ -9,7 +9,7 @@
---
- name: restart nova service
service: name={{ item}} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: remove nova-sqlite-db
shell: rm /var/lib/nova/nova.sqlite || touch nova.sqlite.db.removed
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 865ad2e5..c7d6cb72 100644
--- a/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml
+++ b/deploy/adapters/ansible/roles/nova-controller/tasks/nova_install.yml
@@ -18,7 +18,7 @@
- name: install nova related packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -28,7 +28,7 @@
- name: generate nova control service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: update nova conf
template: src=templates/nova.conf
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
index 99441b6d..525f4334 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
@@ -49,7 +49,8 @@
- { regexp: "^\\s*config.storageManager.ip", line: "config.storageManager.ip = '{{ contrail_keystone_address }}';" }
- { regexp: "^\\s*config.cnfg.server_ip", line: "config.cnfg.server_ip = '{{ contrail_haproxy_address }}';" }
- { regexp: "^\\s*config.analytics.server_ip", line: "config.analytics.server_ip = '{{ contrail_haproxy_address }}';" }
- - { regexp: "^\\s*config.cassandra.server_ips", line: "config.cassandra.server_ips = [{{ cassandra_addrs }}];" }
+# TODO: when I update ansibel version to 2.2, this playbook can't pass the test. ERROR log: "'cassandra_addrs' is undefined".
+# - { regexp: "^\\s*config.cassandra.server_ips", line: "config.cassandra.server_ips = [{{ cassandra_addrs }}];" }
- name: "modify webui userauth js"
lineinfile:
diff --git a/deploy/adapters/ansible/roles/secgroup/handlers/main.yml b/deploy/adapters/ansible/roles/secgroup/handlers/main.yml
index e4e11ec7..77082ded 100644
--- a/deploy/adapters/ansible/roles/secgroup/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/secgroup/handlers/main.yml
@@ -10,9 +10,9 @@
- name: restart controller relation service
service: name={{ item }} state=restarted enabled=yes
ignore_errors: True
- with_items: controller_services
+ with_items: "{{ controller_services }}"
- name: restart compute relation service
service: name={{ item }} state=restarted enabled=yes
ignore_errors: True
- with_items: compute_services
+ with_items: "{{ compute_services }}"
diff --git a/deploy/adapters/ansible/roles/secgroup/tasks/secgroup.yml b/deploy/adapters/ansible/roles/secgroup/tasks/secgroup.yml
index 5e8684d4..9323facc 100644
--- a/deploy/adapters/ansible/roles/secgroup/tasks/secgroup.yml
+++ b/deploy/adapters/ansible/roles/secgroup/tasks/secgroup.yml
@@ -12,24 +12,27 @@
tags: secgroup
- name: copy configs
- template: src={{ item.src}} dest=/opt/os_templates
- with_items: "{{ configs_templates }}"
+ template: src={{ item }} dest=/opt/os_templates
+ with_items:
+ - nova.j2
+ - neutron.j2
tags: secgroup
- name: update controller configs
- shell: '[ -f {{ item.1 }} ] && crudini --merge {{ item.1 }} < /opt/os_templates/{{ item.0.src }} || /bin/true'
+ shell: "[ -f '{{ item.1 }}' ] && crudini --merge '{{ item.1 }}' < /opt/os_templates/{{ item.0.src }} || /bin/true"
tags: secgroup
with_subelements:
- - configs_templates
+ - "{{ configs_templates }}"
- dest
notify: restart controller relation service
when: inventory_hostname in "{{ groups['controller'] }}"
- name: update compute configs
- shell: '[ -f {{ item.1 }} ] && crudini --merge {{ item.1 }} < /opt/os_templates/{{ item.0.src }} || /bin/true'
+ shell: "[ -f '{{ item.1 }}' ] && crudini --merge '{{ item.1 }}' < /opt/os_templates/{{ item.0.src }} || /bin/true"
tags: secgroup
with_subelements:
- - configs_templates
+ - "{{ configs_templates }}"
- dest
notify: restart compute relation service
when: inventory_hostname in "{{ groups['compute'] }}"
+
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
index e1fdf925..2649ea79 100644
--- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml
@@ -65,14 +65,14 @@
shell: >
python /opt/setup_networks/check_network.py \
"{{ inventory_hostname }}" \
- "{{ ip_settings }}"
+ "{{ ip_settings | to_json }}"
tags:
- network_check
retries: 3
delay: 2
- name: add to boot scripts
- service: name=net_init enabled=yes
+ shell: update-rc.d net_init defaults
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/setup-network/templates/network.cfg b/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
index 75ba90cb..cf271ad6 100644
--- a/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
+++ b/deploy/adapters/ansible/roles/setup-network/templates/network.cfg
@@ -1,5 +1,5 @@
-bond_mappings: {{ network_cfg["bond_mappings"] }}
-ip_settings: {{ ip_settings[inventory_hostname] }}
-sys_intf_mappings: {{ sys_intf_mappings }}
-provider_net_mappings: {{ network_cfg["provider_net_mappings"] }}
+bond_mappings: {{ network_cfg["bond_mappings"] | to_json }}
+ip_settings: {{ ip_settings[inventory_hostname] | to_json }}
+sys_intf_mappings: {{ sys_intf_mappings | to_json }}
+provider_net_mappings: {{ network_cfg["provider_net_mappings"] | to_json }}
diff --git a/deploy/adapters/ansible/roles/storage/tasks/loop.yml b/deploy/adapters/ansible/roles/storage/tasks/loop.yml
index 21b393d5..b0fb9c21 100755
--- a/deploy/adapters/ansible/roles/storage/tasks/loop.yml
+++ b/deploy/adapters/ansible/roles/storage/tasks/loop.yml
@@ -13,7 +13,7 @@
register: part_size
- name: create image file if not exitst
- script: create_img.sh \"{{ part_size.stdout }}\"
+ script: create_img.sh "{{ part_size.stdout }}"
- name: do a losetup on storage volumes
script: losetup.sh
diff --git a/deploy/adapters/ansible/roles/storage/tasks/main.yml b/deploy/adapters/ansible/roles/storage/tasks/main.yml
index b48e6769..be712c67 100755
--- a/deploy/adapters/ansible/roles/storage/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/storage/tasks/main.yml
@@ -15,7 +15,7 @@
- name: load loop.yml
include: loop.yml
- when: status.stat.exists == False or status.stat.isblk == False
+ when: status.stat.exists == False or status.stat.isblk == False
tags:
- storage
@@ -50,7 +50,7 @@
- name: enable service
- service: name=storage enabled=yes
+ shell: update-rc.d storage defaults
tags:
- storage