diff --git a/defaults/main.yml b/defaults/main.yml index 8719541..1f54320 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -#python venv executable +# python venv executable rally_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}" # Set the package install state for distribution and pip packages @@ -36,12 +36,17 @@ rally_bin: "/openstack/venvs/rally-{{ rally_venv_tag }}/bin" # Database vars rally_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" -rally_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((rally_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" +rally_db_setup_python_interpreter: |- + {{ + openstack_db_setup_python_interpreter | default( + (rally_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) + }} rally_galera_address: "{{ galera_address | default('127.0.0.1') }}" rally_galera_port: 3306 rally_galera_database: rally rally_galera_user: rally -rally_database_connection_string: mysql+pymysql://{{ rally_galera_user }}:{{ rally_galera_password }}@{{ rally_galera_address }}/{{ rally_galera_database }}?charset=utf8 +rally_database_connection_string: >- + mysql+pymysql://{{ rally_galera_user }}:{{ rally_galera_password }}@{{ rally_galera_address }}/{{ rally_galera_database }}?charset=utf8 rally_openstack_git_repo: https://opendev.org/openstack/rally-openstack rally_openstack_git_install_branch: master diff --git a/meta/main.yml b/meta/main.yml index 63457b4..16e8281 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,18 +18,23 @@ galaxy_info: description: Install and configure OpenStack Rally company: Comcast Corportation license: Apache2 - min_ansible_version: 2.2 + role_name: os_rally + namespace: openstack + min_ansible_version: "2.10" platforms: - name: Debian versions: - - buster + - bullseye - name: Ubuntu versions: - - bionic - focal + - jammy + - name: EL + versions: + - "9" galaxy_tags: [] dependencies: - role: apt_package_pinning when: - ansible_facts['pkg_mgr'] == 'apt' - - openstack_openrc + - role: openstack_openrc diff --git a/tasks/main.yml b/tasks/main.yml index b37b337..ebaab2f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -25,7 +25,8 @@ - always -- include_role: +- name: Including osa.db_setup role + include_role: name: openstack.osa.db_setup apply: tags: @@ -44,7 +45,8 @@ tags: - always -- include_tasks: rally_pre_install.yml +- name: Including rally_pre_install tasks + include_tasks: rally_pre_install.yml tags: - rally-install @@ -57,8 +59,9 @@ when: rally_openstack_git_repo is search('http') - name: Retrieve local filesystem upper constraints in CI - command: - git --git-dir={{ rally_openstack_git_repo.split('file://')[1] }}/.git show {{ rally_openstack_git_install_branch | default('master') }}:upper-constraints.txt + command: >- + git --git-dir={{ rally_openstack_git_repo.split('file://')[1] }}/.git show + {{ rally_openstack_git_install_branch | default('master') }}:upper-constraints.txt when: rally_openstack_git_repo is search('file://') register: _u_c_contents_git delegate_to: localhost @@ -94,11 +97,13 @@ tags: - rally-install -- include_tasks: rally_post_install.yml +- name: Including rally_post_install tasks + include_tasks: rally_post_install.yml tags: - rally-config -- include_tasks: rally_db_setup.yml +- name: Including rally_db_setup tasks + include_tasks: rally_db_setup.yml when: inventory_hostname == groups['utility_all'][0] tags: - rally-config diff --git a/tasks/rally_db_setup.yml b/tasks/rally_db_setup.yml index 6d07700..dfa5553 100644 --- a/tasks/rally_db_setup.yml +++ b/tasks/rally_db_setup.yml @@ -21,6 +21,7 @@ - name: Create/upgrade Rally DB schema command: "{{ rally_bin }}/rally db create" + changed_when: false when: - rally_deployment_list_result.stdout is search("Database is missing")