diff options
author | carey.xu <carey.xuhan@huawei.com> | 2016-03-18 19:21:47 +0800 |
---|---|---|
committer | carey xu <carey.xuhan@huawei.com> | 2016-03-21 02:07:26 +0000 |
commit | 64747935b777d88346f9f05acf6dee4bf19e53cf (patch) | |
tree | ba66c7d6382436da81ef8cd13d8e1ab26ee94e66 /deploy/adapters/ansible/roles/keystone/tasks | |
parent | 00826d9f9131b5b3d76d01c13912496ec6067204 (diff) |
use apache2 instead of evenlet in keystone
JIRA: COMPASS-335
Change-Id: I7a062ee5486b84d2b8a29c884ba17b1d4f8500a0
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/keystone/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml | 55 |
1 files changed, 50 insertions, 5 deletions
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml index 0c4eccc3..78732496 100644 --- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml +++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml @@ -9,19 +9,66 @@ --- - include_vars: "{{ ansible_os_family }}.yml" +- name: disable auto start + copy: + content: "#!/bin/sh\nexit 101" + dest: "/usr/sbin/policy-rc.d" + mode: 0755 + when: ansible_os_family == "Debian" + - name: install keystone packages action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" with_items: packages | union(packages_noarch) +- name: enable auto start + file: + path=/usr/sbin/policy-rc.d + state=absent + when: ansible_os_family == "Debian" + - name: generate keystone service list lineinfile: dest=/opt/service create=yes line='{{ item }}' with_items: services | union(services_noarch) +- name: delete sqlite database + file: + path: /var/lib/keystone/keystone.db + state: absent + - name: update keystone conf template: src=keystone.conf dest=/etc/keystone/keystone.conf backup=yes + notify: + - restart keystone services -- name: delete sqlite database - shell: rm /var/lib/keystone/keystone.db || echo sqllite database already removed +- name: assure listen port exist + lineinfile: + dest: '{{ apache_config_dir }}/ports.conf' + regexp: '{{ item.regexp }}' + line: '{{ item.line}}' + with_items: + - regexp: "^Listen {{ internal_ip }}:5000" + line: "Listen {{ internal_ip }}:5000" + - regexp: "^Listen {{ internal_ip }}:35357" + line: "Listen {{ internal_ip }}:35357" + notify: + - restart keystone services + +- name: update apache2 configs + template: + src: wsgi-keystone.conf.j2 + dest: '{{ apache_config_dir }}/sites-available/wsgi-keystone.conf' + when: ansible_os_family == 'Debian' + notify: + - restart keystone services + +- name: enable keystone server + file: + src: "/etc/apache2/sites-available/wsgi-keystone.conf" + dest: "/etc/apache2/sites-enabled/wsgi-keystone.conf" + state: "link" + when: ansible_os_family == 'Debian' + notify: + - restart keystone services - name: keystone source files template: src={{ item }} dest=/opt/{{ item }} @@ -29,6 +76,4 @@ - admin-openrc.sh - demo-openrc.sh -- name: restart keystone services - service: name={{ item }} state=restarted enabled=yes - with_items: services | union(services_noarch) +- meta: flush_handlers |