diff --git a/tasks/main.yml b/tasks/main.yml index 6315dc1..fa0ef88 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Gather variables for each operating system - include_vars: "{{ item }}" + ansible.builtin.include_vars: "{{ item }}" with_first_found: - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml" - "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml" @@ -25,7 +25,7 @@ - always - name: Including osa.db_setup role - include_role: + ansible.builtin.include_role: name: openstack.osa.db_setup apply: tags: @@ -45,12 +45,12 @@ - always - name: Including rally_pre_install tasks - include_tasks: rally_pre_install.yml + ansible.builtin.include_tasks: rally_pre_install.yml tags: - rally-install - name: Retrieve the constraints URL - uri: + ansible.builtin.uri: url: "{{ rally_upper_constraints_url }}" return_content: true register: _u_c_contents_uri @@ -71,7 +71,7 @@ - skip_ansible_lint - name: Set the constraints content - set_fact: + ansible.builtin.set_fact: _u_c_contents: |- {% if _u_c_contents_uri is not skipped %} {{ _u_c_contents_uri.content }} @@ -80,7 +80,7 @@ {% endif %} - name: Install the python venv - import_role: + ansible.builtin.import_role: name: "python_venv_build" vars: venv_python_executable: "{{ rally_venv_python_executable }}" @@ -100,12 +100,12 @@ - rally-install - name: Including rally_post_install tasks - include_tasks: rally_post_install.yml + ansible.builtin.include_tasks: rally_post_install.yml tags: - rally-config - name: Including rally_db_setup tasks - include_tasks: rally_db_setup.yml + ansible.builtin.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 dfa5553..17457f4 100644 --- a/tasks/rally_db_setup.yml +++ b/tasks/rally_db_setup.yml @@ -14,25 +14,25 @@ # limitations under the License. - name: Check for db - command: "{{ rally_bin }}/rally deployment list" + ansible.builtin.command: "{{ rally_bin }}/rally deployment list" changed_when: false failed_when: false register: rally_deployment_list_result - name: Create/upgrade Rally DB schema - command: "{{ rally_bin }}/rally db create" + ansible.builtin.command: "{{ rally_bin }}/rally db create" changed_when: false when: - rally_deployment_list_result.stdout is search("Database is missing") - name: Check for existing Rally deployment - command: "{{ rally_bin }}/rally deployment list" + ansible.builtin.command: "{{ rally_bin }}/rally deployment list" changed_when: false failed_when: false register: rally_deployment_list_result - name: Setup the Rally deployment - shell: | + ansible.builtin.shell: | . /root/openrc . {{ rally_bin }}/activate {{ rally_bin }}/rally deployment create --fromenv --name=existing diff --git a/tasks/rally_pre_install.yml b/tasks/rally_pre_install.yml index 4b5f6b0..e425c52 100644 --- a/tasks/rally_pre_install.yml +++ b/tasks/rally_pre_install.yml @@ -14,13 +14,13 @@ # limitations under the License. - name: Create the Rally system group - group: + ansible.builtin.group: name: "{{ rally_system_group_name }}" state: "present" system: "yes" - name: Create the Rally system user - user: + ansible.builtin.user: name: "{{ rally_system_user_name }}" group: "{{ rally_system_group_name }}" comment: "{{ rally_system_user_comment }}" @@ -30,7 +30,7 @@ home: "{{ rally_system_user_home }}" - name: Create Rally directories - file: + ansible.builtin.file: path: "{{ item.path }}" state: "directory" owner: "{{ rally_system_user_name }}"