init
This commit is contained in:
commit
e64e466d17
|
@ -0,0 +1,46 @@
|
|||
- 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
|
|
@ -0,0 +1,28 @@
|
|||
- name: Check for keystone running under apache
|
||||
tags: common
|
||||
shell: httpd -t -D DUMP_VHOSTS | grep -q keystone_wsgi
|
||||
ignore_errors: true
|
||||
register: httpd_enabled
|
||||
- name: Check if httpd is running
|
||||
tags: common
|
||||
command: systemctl is-active --quiet httpd
|
||||
ignore_errors: true
|
||||
register: httpd_running
|
||||
- name: 'PreUpgrade step0,validation: Check if keystone_wsgi is running under httpd'
|
||||
shell: systemctl status 'httpd' | grep -q keystone
|
||||
tags: validation
|
||||
when:
|
||||
- step|int == 0
|
||||
- httpd_enabled.rc == 0
|
||||
- httpd_running.rc == 0
|
||||
- name: Stop and disable keystone service (running under httpd)
|
||||
when:
|
||||
- step|int == 2
|
||||
- httpd_enabled.rc == 0
|
||||
- httpd_running.rc == 0
|
||||
service: name=httpd state=stopped enabled=no
|
||||
- name: remove old keystone cron jobs
|
||||
when: step|int == 2
|
||||
file:
|
||||
path: /var/spool/cron/keystone
|
||||
state: absent
|
Loading…
Reference in New Issue