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: I331c29a26b98cf813b255c981ba45e1db8561c9f
This commit is contained in:
Dmitriy Rabotyagov 2025-02-12 14:22:36 +01:00
parent 4cfbde9911
commit 6477157411
7 changed files with 29 additions and 29 deletions

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Stop services
service:
ansible.builtin.service:
name: "{{ item.service_name }}"
enabled: true
state: "stopped"
@ -30,7 +30,7 @@
- "cert installed"
- name: Start services
service:
ansible.builtin.service:
name: "{{ item.service_name }}"
enabled: true
state: "started"

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: Fail if service was deployed using a different installation method
fail:
ansible.builtin.fail:
msg: "Switching installation methods for OpenStack services is not supported"
when:
- ansible_local is defined
@ -39,12 +39,12 @@
- ansible_local.openstack_ansible.placement.install_method != placement_install_method
- name: Gather variables for installation method
include_vars: "{{ placement_install_method }}_install.yml"
ansible.builtin.include_vars: "{{ placement_install_method }}_install.yml"
tags:
- always
- name: Including osa.db_setup role
include_role:
ansible.builtin.include_role:
name: openstack.osa.db_setup
apply:
tags:
@ -66,17 +66,17 @@
- always
- name: Importing placement_pre_install tasks
import_tasks: placement_pre_install.yml
ansible.builtin.import_tasks: placement_pre_install.yml
tags:
- placement-install
- name: Importing placement_install tasks
import_tasks: placement_install.yml
ansible.builtin.import_tasks: placement_install.yml
tags:
- placement-install
- name: Create and install SSL certificates
include_role:
ansible.builtin.include_role:
name: pki
tasks_from: main_certs.yml
apply:
@ -96,19 +96,19 @@
- always
- name: Importing placement_post_install tasks
import_tasks: placement_post_install.yml
ansible.builtin.import_tasks: placement_post_install.yml
tags:
- placement-config
- post-install
- name: Importing placement_db_sync tasks
import_tasks: placement_db_sync.yml
ansible.builtin.import_tasks: placement_db_sync.yml
when: _placement_is_first_play_host
tags:
- placement-config
- name: Import uwsgi role
import_role:
ansible.builtin.import_role:
name: uwsgi
vars:
uwsgi_services: "{{ uwsgi_placement_services }}"
@ -118,7 +118,7 @@
- uwsgi
- name: Including osa.service_setup role
include_role:
ansible.builtin.include_role:
name: openstack.osa.service_setup
apply:
tags:
@ -154,10 +154,10 @@
- always
- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers
- name: Including placement_db_post_setup tasks
include_tasks: placement_db_post_setup.yml
ansible.builtin.include_tasks: placement_db_post_setup.yml
args:
apply:
tags:

View File

@ -14,12 +14,12 @@
# limitations under the License.
- name: Refresh local facts
setup:
ansible.builtin.setup:
filter: ansible_local
gather_subset: "!all"
- name: Perform a Placement DB online migrations
command: "{{ placement_bin }}/placement-manage db online_data_migrations"
ansible.builtin.command: "{{ placement_bin }}/placement-manage db online_data_migrations"
become: true
become_user: "{{ placement_system_user_name }}"
changed_when: false
@ -33,7 +33,7 @@
- name: Disable the online migrations requirement
delegate_to: "{{ item }}"
ini_file:
community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: placement
option: need_online_data_migrations

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Perform a Placement DB sync
command: "{{ placement_bin }}/placement-manage db sync"
ansible.builtin.command: "{{ placement_bin }}/placement-manage db sync"
become: true
become_user: "{{ placement_system_user_name }}"
changed_when: false

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Record the installation method
ini_file:
community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: "placement"
option: "install_method"
@ -22,12 +22,12 @@
mode: "0644"
- name: Refresh local facts to ensure the placement section is present
setup:
ansible.builtin.setup:
filter: ansible_local
gather_subset: "!all"
- name: Install distro packages
package:
ansible.builtin.package:
name: "{{ placement_package_list }}"
state: "{{ placement_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
@ -38,7 +38,7 @@
delay: 2
- name: Install the python venv
import_role:
ansible.builtin.import_role:
name: "python_venv_build"
vars:
venv_python_executable: "{{ placement_venv_python_executable }}"
@ -58,7 +58,7 @@
when: placement_install_method == 'source'
- name: Record the need for a service restart
ini_file:
community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: "placement"
option: "need_online_data_migrations"
@ -68,7 +68,7 @@
('need_online_data_migrations' not in ansible_local['openstack_ansible']['placement'])
- name: Run the systemd service role
include_role:
ansible.builtin.include_role:
name: systemd_service
vars:
systemd_user_name: "{{ placement_system_user_name }}"

View File

@ -42,7 +42,7 @@
- placement-policy-override
- name: Remove legacy policy.yaml file
file:
ansible.builtin.file:
path: "/etc/placement/policy.yaml"
state: absent
when:

View File

@ -14,14 +14,14 @@
# limitations under the License.
- name: Create the system group
group:
ansible.builtin.group:
name: "{{ placement_system_group_name }}"
gid: "{{ placement_system_group_gid | default(omit) }}"
state: "present"
system: "yes"
- name: Create the placement system user
user:
ansible.builtin.user:
name: "{{ placement_system_user_name }}"
uid: "{{ placement_system_user_uid | default(omit) }}"
group: "{{ placement_system_group_name }}"
@ -32,7 +32,7 @@
home: "{{ placement_system_user_home }}"
- name: Create placement dir
file:
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner | default(placement_system_user_name) }}"