47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
- name: Check for keystone running under apache
|
|
tags: common
|
|
shell: httpd -t -D DUMP_VHOSTS | grep -q keystone_wsgi
|
|
ignore_errors: true
|
|
register: keystone_httpd_enabled_result
|
|
when:
|
|
- step|int == 0
|
|
- release == 'ocata'
|
|
- name: Set fact keystone_httpd_enabled
|
|
set_fact:
|
|
keystone_httpd_enabled: '{{ keystone_httpd_enabled_result.rc == 0 }}'
|
|
when:
|
|
- step|int == 0
|
|
- release == 'ocata'
|
|
- name: Check if httpd is running
|
|
ignore_errors: true
|
|
command: systemctl is-active --quiet httpd
|
|
register: httpd_running_result
|
|
when:
|
|
- step|int == 0
|
|
- release == 'ocata'
|
|
- httpd_running is undefined
|
|
- name: Set fact httpd_running if undefined
|
|
set_fact:
|
|
httpd_running: '{{ httpd_running_result.rc == 0 }}'
|
|
when:
|
|
- step|int == 0
|
|
- release == 'ocata'
|
|
- httpd_running is undefined
|
|
- name: Stop and disable keystone (under httpd)
|
|
service: name=httpd state=stopped enabled=no
|
|
when:
|
|
- step|int == 1
|
|
- release == 'ocata'
|
|
- keystone_httpd_enabled|bool
|
|
- httpd_running|bool
|
|
- name: Keystone package update
|
|
yum: name=openstack-keystone* state=latest
|
|
when:
|
|
- step|int == 6
|
|
- is_bootstrap_node|bool
|
|
- name: keystone db sync
|
|
command: keystone-manage db_sync
|
|
when:
|
|
- step|int == 8
|
|
- is_bootstrap_node|bool
|