browbeat/ansible/check/roles/keystone/tasks/main.yml
Joe 4bb7679f47 Fix Checks
Change-Id: Ic2c6089fecec7034c9c6345d218211aaf5b136ab
2016-04-28 15:02:45 -04:00

65 lines
2.1 KiB
YAML

---
#
# Keystone tasks for performance checks
#
- name: Check Keystone cron job
shell: crontab -l -u keystone | grep -v "#"
register: keystone_cron_result
changed_when: false
failed_when: "'token_flush' not in '{{ keystone_cron_result.stdout }}'"
ignore_errors: True
- name: Check Keystone Token Provider
command: crudini --get /etc/keystone/keystone.conf token provider
register: keystone_token_provider
changed_when: false
ignore_errors: True
- debug: msg="Keystone Token Provider:{{ keystone_token_provider.stdout }}"
- name: Determine if Keystone is deployed in eventlet
shell: ps afx | grep "[Kk]eystone-all" -c
register: keystone_in_eventlet
changed_when: false
ignore_errors: True
- name: Set keystone_deployment variable to httpd
set_fact: keystone_deployment='httpd'
when: keystone_in_eventlet.stdout|int == 0
- name: Set keystone_deployment variable to eventlet
set_fact: keystone_deployment='eventlet'
when: keystone_in_eventlet.stdout|int > 0
- debug: msg="Keystone deployed in:{{ keystone_deployment }}"
- name: Keystone HTTP admin processes
command: egrep -o "processes=[0-9]+" /etc/httpd/conf.d/*keystone*admin.conf | egrep -o "[0-9]+"
register: bz1330980
failed_when: bz1330980.stdout|int < keystone_processes
when: keystone_in_eventlet.stdout|int == 0
failed_when:
ignore_errors: True
- name: Keystone HTTP main processes
command: egrep -o "processes=[0-9]+" /etc/httpd/conf.d/*keystone*main.conf | egrep -o "[0-9]+"
register: bz1330980
failed_when: bz1330980.stdout|int < keystone_processes
when: keystone_in_eventlet.stdout|int == 0
ignore_errors: True
- name: Keystone HTTP admin threads
command: egrep -o "threads=[0-9]+" /etc/httpd/conf.d/*keystone*admin.conf | egrep -o "[0-9]+"
register: bz1330980
failed_when: bz1330980.stdout|int < keystone_threads
when: keystone_in_eventlet.stdout|int == 0
ignore_errors: True
- name: Keystone HTTP main threads
command: egrep -o "threads=[0-9]+" /etc/httpd/conf.d/*keystone*main.conf | egrep -o "[0-9]+"
register: bz1330980
failed_when: bz1330980.stdout|int < keystone_threads
when: keystone_in_eventlet.stdout|int == 0
ignore_errors: True