Auto-fix usage of modules via FQCN

Since ansible-core 2.10 it is recommended to use modules via FQCN
In order to align with recommendation, we perform migration
by applying suggestions made by `ansible-lint --fix=fqcn`

Change-Id: I609fd749e50b5c9f5b52d04ae2a566671c476720
This commit is contained in:
Dmitriy Rabotyagov 2025-02-12 14:25:48 +01:00
parent aed226f321
commit c6a2e94c5a
3 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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 }}"