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: I36c7db8fa2aa35bc1250c1a2e609ad94c9471f9a
This commit is contained in:
Dmitriy Rabotyagov 2025-02-12 13:32:18 +01:00
parent 3348536dcc
commit 94d25fcb94
5 changed files with 18 additions and 18 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Restart masakari services - name: Restart masakari services
service: ansible.builtin.service:
name: "{{ item.value.service_name }}" name: "{{ item.value.service_name }}"
state: restarted state: restarted
daemon_reload: true daemon_reload: true

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Gather variables for each operating system - name: Gather variables for each operating system
include_vars: "{{ lookup('first_found', params) }}" ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
vars: vars:
params: params:
files: files:
@ -29,7 +29,7 @@
- always - always
- name: Including osa.db_setup role - name: Including osa.db_setup role
include_role: ansible.builtin.include_role:
name: openstack.osa.db_setup name: openstack.osa.db_setup
apply: apply:
tags: tags:
@ -51,7 +51,7 @@
- always - always
- name: Including osa.mq_setup role - name: Including osa.mq_setup role
include_role: ansible.builtin.include_role:
name: openstack.osa.mq_setup name: openstack.osa.mq_setup
apply: apply:
tags: tags:
@ -77,12 +77,12 @@
- always - always
- name: Importing masakari_pre_install tasks - name: Importing masakari_pre_install tasks
import_tasks: masakari_pre_install.yml ansible.builtin.import_tasks: masakari_pre_install.yml
tags: tags:
- masakari-install - masakari-install
- name: Create and install SSL certificates - name: Create and install SSL certificates
include_role: ansible.builtin.include_role:
name: pki name: pki
tasks_from: main_certs.yml tasks_from: main_certs.yml
apply: apply:
@ -102,7 +102,7 @@
- always - always
- name: Install the python venv - name: Install the python venv
import_role: ansible.builtin.import_role:
name: "python_venv_build" name: "python_venv_build"
vars: vars:
venv_python_executable: "{{ masakari_venv_python_executable }}" venv_python_executable: "{{ masakari_venv_python_executable }}"
@ -122,13 +122,13 @@
- masakari-install - masakari-install
- name: Importing masakari_post_install tasks - name: Importing masakari_post_install tasks
import_tasks: masakari_post_install.yml ansible.builtin.import_tasks: masakari_post_install.yml
tags: tags:
- masakari-config - masakari-config
- post-install - post-install
- name: Run the systemd service role - name: Run the systemd service role
import_role: ansible.builtin.import_role:
name: systemd_service name: systemd_service
vars: vars:
systemd_user_name: "{{ masakari_system_user_name }}" systemd_user_name: "{{ masakari_system_user_name }}"
@ -160,12 +160,12 @@
- systemd-service - systemd-service
- name: Importing masakari_db_sync tasks - name: Importing masakari_db_sync tasks
import_tasks: masakari_db_sync.yml ansible.builtin.import_tasks: masakari_db_sync.yml
when: when:
- "_masakari_is_first_play_host" - "_masakari_is_first_play_host"
- name: Including osa.service_setup role - name: Including osa.service_setup role
include_role: ansible.builtin.include_role:
name: openstack.osa.service_setup name: openstack.osa.service_setup
apply: apply:
tags: tags:
@ -206,4 +206,4 @@
- always - always
- name: Flush handlers - name: Flush handlers
meta: flush_handlers ansible.builtin.meta: flush_handlers

View File

@ -14,7 +14,7 @@
# limitations under the License # limitations under the License
- name: Perform a synchronization of the Masakari database - name: Perform a synchronization of the Masakari database
command: "{{ masakari_bin }}/masakari-manage db sync" ansible.builtin.command: "{{ masakari_bin }}/masakari-manage db sync"
become: true become: true
become_user: "{{ masakari_system_user_name }}" become_user: "{{ masakari_system_user_name }}"
changed_when: false changed_when: false

View File

@ -62,7 +62,7 @@
- masakari-policy-override - masakari-policy-override
- name: Remove legacy policy.yaml file - name: Remove legacy policy.yaml file
file: ansible.builtin.file:
path: "{{ masakari_etc_dir }}/policy.yaml" path: "{{ masakari_etc_dir }}/policy.yaml"
state: absent state: absent
when: when:
@ -72,7 +72,7 @@
- masakari-policy-override - masakari-policy-override
- name: Deploy masakari-monitors sudoers files - name: Deploy masakari-monitors sudoers files
template: ansible.builtin.template:
src: "masakari_sudoers.j2" src: "masakari_sudoers.j2"
dest: "/etc/sudoers.d/masakari_sudoers" dest: "/etc/sudoers.d/masakari_sudoers"
owner: "root" owner: "root"

View File

@ -14,14 +14,14 @@
# limitations under the License. # limitations under the License.
- name: Create the system group - name: Create the system group
group: ansible.builtin.group:
name: "{{ masakari_system_group_name }}" name: "{{ masakari_system_group_name }}"
gid: "{{ masakari_system_group_gid | default(omit) }}" gid: "{{ masakari_system_group_gid | default(omit) }}"
state: "present" state: "present"
system: "yes" system: "yes"
- name: Create the masakari system user - name: Create the masakari system user
user: ansible.builtin.user:
name: "{{ masakari_system_user_name }}" name: "{{ masakari_system_user_name }}"
uid: "{{ masakari_system_user_uid | default(omit) }}" uid: "{{ masakari_system_user_uid | default(omit) }}"
group: "{{ masakari_system_group_name }}" group: "{{ masakari_system_group_name }}"
@ -32,7 +32,7 @@
home: "{{ masakari_system_user_home }}" home: "{{ masakari_system_user_home }}"
- name: Create masakari dir - name: Create masakari dir
file: ansible.builtin.file:
path: "{{ item.path | realpath }}" path: "{{ item.path | realpath }}"
state: directory state: directory
owner: "{{ item.owner | default(masakari_system_user_name) }}" owner: "{{ item.owner | default(masakari_system_user_name) }}"