c60b55ec83
This commit enanbles Ansible linting and does some minor refactoring to make existing Ansible roles compatible with the new rules. Several Ansible linting rules have been excluded to keep the number of changes from being too onerous. Also a new script in ci-scripts is used to check very config file included in the Browbeat repo for validity using the template Browbeat uses when it runs. Here's a list of the new linting rules * Ansible tasks must have names * When you use shell you must use become not sudo * Using become_user without using become is not allowed * If a repo is pulled it must be a pinned version of commit, not latest * Always_run is deprecated don't use it * Variables without {{}} and not in when statements are deprecated don't use them * No Trailing whitepaces * YAML checking, catches big syntax errors but not less obvious ones Change-Id: Ic531c91c408996d4e7d8899afe8b21d364998680
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
---
|
|
#
|
|
# Playbook to check OSP install for common performance tuning issues
|
|
#
|
|
|
|
- hosts: localhost
|
|
name: Get MySQL Tuner Script
|
|
gather_facts: false
|
|
vars:
|
|
ansible_connection: local
|
|
tasks:
|
|
- name: Get MySQL Tuner Script
|
|
get_url: url={{mysql_tuner_script}} dest={{playbook_dir}}
|
|
|
|
- hosts: undercloud
|
|
name: Checking Undercloud for common Performance Issues
|
|
remote_user: stack
|
|
roles:
|
|
- common
|
|
- controller
|
|
- undercloud
|
|
- keystone
|
|
- neutron
|
|
- nova
|
|
|
|
- hosts: controller
|
|
name: Checking Controller Nodes for common Performance Issues
|
|
remote_user: heat-admin
|
|
roles:
|
|
- common
|
|
- controller
|
|
- keystone
|
|
- neutron
|
|
- nova
|
|
- glance
|
|
- gnocchi
|
|
|
|
- hosts: compute
|
|
name: Checking Compute Nodes for common Performance Issues
|
|
remote_user: heat-admin
|
|
roles:
|
|
- common
|
|
- compute
|
|
- nova
|
|
|
|
- hosts: cephstorage
|
|
name: Checking Ceph Hosts for common Performance Issues
|
|
remote_user: heat-admin
|
|
roles:
|
|
- common
|
|
- ceph
|
|
|
|
- hosts: localhost
|
|
gather_facts: False
|
|
become: false
|
|
vars:
|
|
ansible_python_interpreter: "/usr/bin/python"
|
|
name: Generating bug report
|
|
tasks:
|
|
- name: Create results dir
|
|
file: "path={{result_dir}} state=directory"
|
|
- name: Template Bug report
|
|
template: src=templates/bug_report.j2 dest={{result_dir}}/bug_report.log
|
|
become: false
|
|
- name: Template MySQL report
|
|
template: src=templates/mysql_report.j2 dest={{result_dir}}/mysql_report.log
|
|
become: false
|
|
- name: Run MySQL report regex
|
|
replace: dest={{result_dir}}/mysql_report.log regexp='\[([^\s+]+)' replace=''
|
|
- name: Run MySQL report regex
|
|
replace: dest={{result_dir}}/mysql_report.log regexp='\r' replace=''
|