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: I9677f44a6b801094070850c103543ffa6cb60e0f
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Stop services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: true
|
||||
state: "stopped"
|
||||
@@ -31,7 +31,7 @@
|
||||
- "cert installed"
|
||||
|
||||
- name: Start services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: true
|
||||
state: "started"
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Perform a Aodh DB sync
|
||||
command: "{{ aodh_bin }}/aodh-dbsync"
|
||||
ansible.builtin.command: "{{ aodh_bin }}/aodh-dbsync"
|
||||
become: true
|
||||
become_user: "{{ aodh_system_user_name }}"
|
||||
changed_when: false
|
||||
|
@@ -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: "aodh"
|
||||
option: "install_method"
|
||||
@@ -22,12 +22,12 @@
|
||||
mode: "0644"
|
||||
|
||||
- name: Refresh local facts to ensure the aodh section is present
|
||||
setup:
|
||||
ansible.builtin.setup:
|
||||
filter: ansible_local
|
||||
gather_subset: "!all"
|
||||
|
||||
- name: Install distro packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ aodh_package_list }}"
|
||||
state: "{{ aodh_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
@@ -38,7 +38,7 @@
|
||||
delay: 2
|
||||
|
||||
- name: Install distro packages for testing
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ aodh_test_distro_packages }}"
|
||||
state: "{{ aodh_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
@@ -50,7 +50,7 @@
|
||||
when: install_test_packages|bool
|
||||
|
||||
- name: Install the python venv
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_python_executable: "{{ aodh_venv_python_executable }}"
|
||||
|
@@ -51,7 +51,7 @@
|
||||
- aodh-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/etc/aodh/policy.yaml"
|
||||
state: absent
|
||||
when:
|
||||
|
@@ -14,13 +14,13 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create the system group
|
||||
group:
|
||||
ansible.builtin.group:
|
||||
name: "{{ aodh_system_group_name }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
|
||||
- name: Create the aodh system user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ aodh_system_user_name }}"
|
||||
group: "{{ aodh_system_group_name }}"
|
||||
comment: "{{ aodh_system_comment }}"
|
||||
@@ -30,7 +30,7 @@
|
||||
home: "{{ aodh_system_user_home }}"
|
||||
|
||||
- name: Create aodh dir
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner | default(aodh_system_user_name) }}"
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Fail if our required secrets are not present
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: "Please set the {{ item }} variable prior to applying this role."
|
||||
when: (item is undefined) or (item is none)
|
||||
with_items: "{{ aodh_required_secrets }}"
|
||||
@@ -22,7 +22,7 @@
|
||||
- always
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
@@ -37,7 +37,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
|
||||
@@ -47,12 +47,12 @@
|
||||
- ansible_local.openstack_ansible.aodh.install_method != aodh_install_method
|
||||
|
||||
- name: Gather variables for installation method
|
||||
include_vars: "{{ aodh_install_method }}_install.yml"
|
||||
ansible.builtin.include_vars: "{{ aodh_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:
|
||||
@@ -74,7 +74,7 @@
|
||||
- always
|
||||
|
||||
- name: Including osa.mq_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.mq_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -100,17 +100,17 @@
|
||||
- always
|
||||
|
||||
- name: Importing aodh_pre_install install
|
||||
import_tasks: aodh_pre_install.yml
|
||||
ansible.builtin.import_tasks: aodh_pre_install.yml
|
||||
tags:
|
||||
- aodh-install
|
||||
|
||||
- name: Importing aodh_install install
|
||||
import_tasks: aodh_install.yml
|
||||
ansible.builtin.import_tasks: aodh_install.yml
|
||||
tags:
|
||||
- aodh-install
|
||||
|
||||
- name: Create and install SSL certificates
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: pki
|
||||
tasks_from: main_certs.yml
|
||||
apply:
|
||||
@@ -130,13 +130,13 @@
|
||||
- always
|
||||
|
||||
- name: Importing aodh_post_install tasks
|
||||
import_tasks: aodh_post_install.yml
|
||||
ansible.builtin.import_tasks: aodh_post_install.yml
|
||||
tags:
|
||||
- aodh-config
|
||||
- post-install
|
||||
|
||||
- name: Run the systemd service role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: systemd_service
|
||||
vars:
|
||||
systemd_user_name: "{{ aodh_system_user_name }}"
|
||||
@@ -154,14 +154,14 @@
|
||||
- systemd-service
|
||||
|
||||
- name: Importing aodh_db_sync tasks
|
||||
import_tasks: aodh_db_sync.yml
|
||||
ansible.builtin.import_tasks: aodh_db_sync.yml
|
||||
when:
|
||||
- _aodh_is_first_play_host
|
||||
tags:
|
||||
- aodh-config
|
||||
|
||||
- name: Import uwsgi role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: uwsgi
|
||||
vars:
|
||||
uwsgi_services: "{{ uwsgi_aodh_services }}"
|
||||
@@ -171,7 +171,7 @@
|
||||
- uwsgi
|
||||
|
||||
- name: Including osa.service_setup roles
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
|
Reference in New Issue
Block a user