summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/glance
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/glance')
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/glance_install.yml2
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/glance/tasks/nfs.yml17
-rw-r--r--deploy/adapters/ansible/roles/glance/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/glance/vars/RedHat.yml4
5 files changed, 14 insertions, 15 deletions
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/glance/tasks/main.yml b/deploy/adapters/ansible/roles/glance/tasks/main.yml
index f5ec3c79..4759fdf4 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/main.yml
@@ -17,3 +17,5 @@
- config
- glance_config
- glance
+
+- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
index ff96c64a..758ec082 100644
--- a/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
+++ b/deploy/adapters/ansible/roles/glance/tasks/nfs.yml
@@ -1,19 +1,22 @@
---
-- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: nfs_packages
-
- name: install nfs
- local_action: yum name=nfs-utils state=present
+ local_action: yum name={{ item }} state=present
+ with_items:
+ - rpcbind
+ - nfs-utils
run_once: True
- name: create image directory
local_action: file path=/opt/images state=directory mode=0777
run_once: True
+- name: remove nfs config item if exist
+ local_action: lineinfile dest=/etc/exports state=absent
+ regexp="^/opt/images"
+ run_once: True
+
- name: update nfs config
local_action: lineinfile dest=/etc/exports state=present
- regexp="/opt/images *(rw,insecure,sync,all_squash)"
line="/opt/images *(rw,insecure,sync,all_squash)"
run_once: True
@@ -21,7 +24,7 @@
local_action: service name={{ item }} state=restarted enabled=yes
with_items:
- rpcbind
- - nfs
+ - nfs-server
run_once: True
- name: get mount info
diff --git a/deploy/adapters/ansible/roles/glance/vars/Debian.yml b/deploy/adapters/ansible/roles/glance/vars/Debian.yml
index 974ada23..5cee8f90 100644
--- a/deploy/adapters/ansible/roles/glance/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/glance/vars/Debian.yml
@@ -1,12 +1,10 @@
---
-
packages:
- glance
-
-nfs_packages:
- nfs-common
nfs_services: []
+
services:
- glance-registry
- glance-api
diff --git a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
index bd80d21d..fbf77833 100644
--- a/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/glance/vars/RedHat.yml
@@ -2,10 +2,6 @@
packages:
- openstack-glance
-nfs_packages:
- - nfs-utils
- - rpcbind
-
nfs_services:
- rpcbind
- rpc-statd