63d368c69d
+ Trying to get OSP specific data + Pulling neutron facts + Nova + Adding compute to hardware + Adding undercloud + (rook) Patch to Metadata.py + Getting Metadata in required form + Splitting playbook into roles + (rook) Patching + Generating separate metadata files + Running script through ansible + Passing metadata file location from playbook per rook + Per node ovs version Change-Id: I8202b7702ba6e124356447405f7baacd8a046b95
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
---
|
|
#
|
|
# Tasks to set undercloud facts
|
|
#
|
|
- name: Get max_connections on the database
|
|
shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}'
|
|
register: max_conn
|
|
ignore_errors: true
|
|
|
|
- name: Set max database connections
|
|
set_fact:
|
|
openstack_mysql_max_connections: "{{ max_conn.stdout }}"
|
|
|
|
- name : Get file descriptors for the mysql process
|
|
shell: cat /proc/$(pgrep mysqld_safe)/limits | grep "open files" | awk '{print $4}'
|
|
register: mysql_desc
|
|
|
|
- name: Set file descriptors fact for mysql
|
|
set_fact:
|
|
openstack_mysql_file_descriptors: "{{ mysql_desc.stdout }}"
|
|
|
|
- name : Get rabbitmq file descriptors
|
|
shell: rabbitmqctl status | grep total_limit | awk -F',' '{print $2}' | sed 's/.$//'
|
|
register: rabbitmq_desc
|
|
ignore_errors: true
|
|
|
|
- name: Set rabbitmq file descriptors
|
|
set_fact:
|
|
openstack_rabbitmq_file_descriptors: "{{ rabbitmq_desc.stdout }}"
|
|
|
|
- name: Get Controller Nodes number
|
|
shell: source ~/stackrc; nova list | grep controller | grep ACTIVE | wc -l
|
|
register: controller_count
|
|
|
|
- name : Set Controler number fact
|
|
set_fact:
|
|
osp_controllers_number: "{{ controller_count.stdout }}"
|
|
|
|
- name: Get Compute Nodes number
|
|
shell: source ~/stackrc; nova list | grep compute | grep ACTIVE | wc -l
|
|
register: compute_count
|
|
|
|
- name : Set Commpute number fact
|
|
set_fact:
|
|
osp_computes_number: "{{ compute_count.stdout }}"
|