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.
- name: Restart masakari services
service:
ansible.builtin.service:
name: "{{ item.value.service_name }}"
state: restarted
daemon_reload: true

View File

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

View File

@ -14,7 +14,7 @@
# limitations under the License
- 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_user: "{{ masakari_system_user_name }}"
changed_when: false

View File

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

View File

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