browbeat/ansible/gather/roles/keystone/tasks/main.yml
Joe Talerico b04a1b2fb4 Metdata was missing section
If there is no section, section will default to DEFAULT.

Change-Id: I4d42d0ceac54e923cdb7d62b801336e1f07d258c
2017-03-14 07:35:17 -04:00

65 lines
2.5 KiB
YAML

---
#
# Tasks to set keystone facts
#
- name: Check that Keystone is installed
become: true
stat: path=/etc/keystone/keystone.conf
register: keystone_config
- name: Parse Keystone config
become: true
shell: python /tmp/openstack-config-parser.py keystone /etc/keystone/keystone.conf /tmp/out.yml
when: keystone_config.stat.exists
- name: Fetch output
fetch: src=/tmp/out.yml dest=/tmp/out.yml flat=yes
when: keystone_config.stat.exists
- name: Load configuration variables
include_vars: /tmp/out.yml
when: keystone_config.stat.exists
- 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: openstack_keystone_deployment='httpd'
when: keystone_in_eventlet.stdout|int == 0
- name: Set keystone_deployment variable to eventlet
set_fact: openstack_keystone_deployment='eventlet'
when: keystone_in_eventlet.stdout|int > 0
- name: Determine number of keystone admin processes for httpd
shell: grep processes /etc/httpd/conf.d/10-keystone_wsgi_admin.conf | awk '{print $5}'| awk -F= '{print $2}'
register: keystone_admin_worker_processes
when: keystone_in_eventlet.stdout|int == 0
- name: Determine number of keystone admin threads for httpd
shell: grep threads /etc/httpd/conf.d/10-keystone_wsgi_admin.conf | awk '{print $6}'| awk -F= '{print $2}'
register: keystone_admin_worker_threads
when: keystone_in_eventlet.stdout|int == 0
- name: Determine number of keystone main threads for httpd
shell: grep threads /etc/httpd/conf.d/10-keystone_wsgi_main.conf | awk '{print $6}'| awk -F= '{print $2}'
register: keystone_main_worker_threads
when: keystone_in_eventlet.stdout|int == 0
- name: Determine number of keystone main processes for httpd
shell: grep threads /etc/httpd/conf.d/10-keystone_wsgi_main.conf | awk '{print $5}'| awk -F= '{print $2}'
register: keystone_main_worker_processes
when: keystone_in_eventlet.stdout|int == 0
- name: Set keystone httpd worker facts
set_fact:
openstack_S_keystone_S_admin_workers_S_processes: "{{ keystone_admin_worker_processes.stdout }}"
openstack_S_keystone_S_admin_workers_S_threads: "{{ keystone_admin_worker_threads.stdout }}"
openstack_S_keystone_S_main_workers_S_processes: "{{ keystone_main_worker_processes.stdout }}"
openstack_S_keystone_S_main_workers_S_threads: "{{ keystone_main_worker_threads.stdout }}"
when: keystone_in_eventlet.stdout|int == 0