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: I64308bec4805e24f369cff7bb5f7d01e3ca96d4c
This commit is contained in:
Dmitriy Rabotyagov 2025-02-12 09:00:38 +01:00
parent b8f42066f4
commit 0dfb91007a
5 changed files with 23 additions and 23 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Stop services
systemd:
ansible.builtin.systemd:
name: "{{ item.service_name }}"
state: "stopped"
with_items: "{{ filtered_cloudkitty_services }}"
@ -29,7 +29,7 @@
- "cert installed"
- name: Start services
systemd:
ansible.builtin.systemd:
name: "{{ item.service_name }}"
state: "started"
with_items: "{{ filtered_cloudkitty_services }}"

View File

@ -16,7 +16,7 @@
# limitations under the License.
- name: Perform a cloudkitty DB sync
command: "{{ cloudkitty_bin }}/cloudkitty-dbsync upgrade"
ansible.builtin.command: "{{ cloudkitty_bin }}/cloudkitty-dbsync upgrade"
become: true
become_user: "{{ cloudkitty_system_user_name }}"
changed_when: false
@ -26,7 +26,7 @@
- cloudkitty-command-bin
- name: Init cloudkitty storage backend
command: "{{ cloudkitty_bin }}/cloudkitty-storage-init"
ansible.builtin.command: "{{ cloudkitty_bin }}/cloudkitty-storage-init"
become: true
become_user: "{{ cloudkitty_system_user_name }}"
changed_when: false

View File

@ -58,7 +58,7 @@
- cloudkitty-config
- name: Remove legacy policy.yaml file
file:
ansible.builtin.file:
path: "/etc/cloudkitty/policy.yaml"
state: absent
when:

View File

@ -16,7 +16,7 @@
# limitations under the License.
- name: Create the system group
group:
ansible.builtin.group:
name: "{{ cloudkitty_system_group_name }}"
state: "present"
system: "yes"
@ -24,7 +24,7 @@
- cloudkitty-group
- name: Create the cloudkitty system user
user:
ansible.builtin.user:
name: "{{ cloudkitty_system_user_name }}"
group: "{{ cloudkitty_system_group_name }}"
comment: "{{ cloudkitty_system_comment }}"
@ -36,7 +36,7 @@
- cloudkitty-user
- name: Create cloudkitty dir
file:
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner | default(cloudkitty_system_user_name) }}"
@ -49,7 +49,7 @@
- cloudkitty-dirs
- name: Create cloudkitty report dir
file:
ansible.builtin.file:
path: "{{ cloudkitty_output_basepath }}"
state: directory
owner: "{{ cloudkitty_system_user_name }}"

View File

@ -16,7 +16,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:
@ -31,20 +31,20 @@
- always
- name: Check init system
command: cat /proc/1/comm
ansible.builtin.command: cat /proc/1/comm
changed_when: false
register: _pid1_name
tags:
- always
- name: Set the name of pid1
set_fact:
ansible.builtin.set_fact:
pid1_name: "{{ _pid1_name.stdout }}"
tags:
- always
- name: Including osa.db_setup role
include_role:
ansible.builtin.include_role:
name: openstack.osa.db_setup
apply:
tags:
@ -66,7 +66,7 @@
- always
- name: Including osa.mq_setup role
include_role:
ansible.builtin.include_role:
name: openstack.osa.mq_setup
apply:
tags:
@ -92,12 +92,12 @@
- always
- name: Importing cloudkitty_pre_install tasks
import_tasks: cloudkitty_pre_install.yml
ansible.builtin.import_tasks: cloudkitty_pre_install.yml
tags:
- cloudkitty-install
- name: Create and install SSL certificates
include_role:
ansible.builtin.include_role:
name: pki
tasks_from: main_certs.yml
apply:
@ -117,7 +117,7 @@
- always
- name: Install the python venv
import_role:
ansible.builtin.import_role:
name: "python_venv_build"
vars:
venv_python_executable: "{{ cloudkitty_venv_python_executable }}"
@ -135,13 +135,13 @@
- cloudkitty-install
- name: Importing cloudkitty_post_install tasks
import_tasks: cloudkitty_post_install.yml
ansible.builtin.import_tasks: cloudkitty_post_install.yml
tags:
- cloudkitty-config
- post-install
- name: Import uwsgi role
import_role:
ansible.builtin.import_role:
name: uwsgi
vars:
uwsgi_services: "{{ uwsgi_cloudkitty_services }}"
@ -151,7 +151,7 @@
- uwsgi
- name: Including osa.service_setup role
include_role:
ansible.builtin.include_role:
name: openstack.osa.service_setup
apply:
tags:
@ -187,14 +187,14 @@
- always
- name: Importing cloudkitty_db_sync tasks
import_tasks: cloudkitty_db_sync.yml
ansible.builtin.import_tasks: cloudkitty_db_sync.yml
when:
- _cloudkitty_is_first_play_host
tags:
- cloudkitty-config
- name: Run the systemd service role
include_role:
ansible.builtin.include_role:
name: systemd_service
vars:
systemd_user_name: "{{ cloudkitty_system_user_name }}"
@ -221,4 +221,4 @@
- systemd-service
- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers