summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/glance/tasks
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-08-06 02:37:33 -0400
committerbaigk <baiguoku@huawei.com>2015-08-09 22:47:56 -0400
commit87612abc0e24cafd89a49e350165b08fe1608233 (patch)
tree07b156c0268fd189f92e8a0730118edc51b8073f /deploy/adapters/ansible/roles/glance/tasks
parent5aedf594112c0749b6e9039d15b9fe70d210a942 (diff)
support deployment openstack juno with ansible for compass in centos7.1
JIRA: COMPASS-6 Change-Id: I8ef865e8acfe29c3ff5c7e9030e4cebabed3457b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/glance/tasks')
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_config.yml4
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_install.yml11
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml4
3 files changed, 8 insertions, 11 deletions
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
index 008595dc..0960acfc 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/glance_config.yml
@@ -1,6 +1,7 @@
---
- name: init glance db version
shell: glance-manage db_version_control 0
+ when: ansible_os_family == "Debian"
- name: sync glance db
shell: sleep 15; su -s /bin/sh -c "glance-manage db_sync" glance
@@ -9,8 +10,7 @@
retries: 5
delay: 3
notify:
- - restart glance-registry
- - restart glance-api
+ - restart glance services
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
index d9d15db3..294b35e8 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/glance_install.yml
@@ -1,13 +1,11 @@
---
-- include_vars: "{{ ansible_os_family }}.yml"
-
- name: install glance packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest force=yes"
- with_items: glance_packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
+ with_items: packages | union(packages_noarch)
- name: generate glance service list
shell: echo {{ item }} >> /opt/service
- with_items: glance_services
+ with_items: services | union(services_noarch)
- name: update glance conf
template: src={{ item }} dest=/etc/glance/{{ item }}
@@ -16,8 +14,7 @@
- glance-api.conf
- glance-registry.conf
notify:
- - restart glance-registry
- - restart glance-api
+ - restart glance services
- name: remove default sqlite db
shell: rm /var/lib/glance/glance.sqlite || touch glance.sqllite.db.removed
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index 70ed91d5..dc1be977 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -1,7 +1,7 @@
---
- name: install packages
- action: "{{ ansible_pkg_mgr }} name=nfs-common state=present"
- with_items: nfs-packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: nfs_packages
- name: install nfs
local_action: yum name=nfs-utils state=present