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: I7220eec2957ea2ef8acfa9dba3e443ab39251646
This commit is contained in:
Dmitriy Rabotyagov 2025-02-11 19:31:12 +01:00
parent 014a97fe88
commit 4416d82c89
12 changed files with 69 additions and 70 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Stop services - name: Stop services
service: ansible.builtin.service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: true enabled: true
state: stopped state: stopped
@ -31,7 +31,7 @@
- "cert installed" - "cert installed"
- name: Start services - name: Start services
service: ansible.builtin.service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: true enabled: true
state: "started" state: "started"
@ -48,7 +48,7 @@
- "cert installed" - "cert installed"
- name: Ensure tgt service restarted - name: Ensure tgt service restarted
service: ansible.builtin.service:
name: "{{ tgt_service_name }}" name: "{{ tgt_service_name }}"
enabled: true enabled: true
state: restarted state: restarted

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Ensure cinder api is available - name: Ensure cinder api is available
uri: ansible.builtin.uri:
url: "{{ cinder_service_v3_internaluri }}" url: "{{ cinder_service_v3_internaluri }}"
status_code: 200,300 status_code: 200,300
validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}" validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}"
@ -28,16 +28,16 @@
# we should do that and use the delegation to the service setup host # we should do that and use the delegation to the service setup host
# so that we can remove the openrc file from the target host. # so that we can remove the openrc file from the target host.
- name: Implement openrc/clouds.yaml - name: Implement openrc/clouds.yaml
import_role: ansible.builtin.import_role:
name: "openstack_openrc" name: "openstack_openrc"
- name: Create singular cinder_backends variable for all hosts - name: Create singular cinder_backends variable for all hosts
set_fact: ansible.builtin.set_fact:
_cinder_backends: "{{ (_cinder_backends | default(cinder_backends | default({}))) | combine(hostvars[item]['cinder_backends'] | default({})) }}" _cinder_backends: "{{ (_cinder_backends | default(cinder_backends | default({}))) | combine(hostvars[item]['cinder_backends'] | default({})) }}"
with_items: "{{ groups[cinder_services['cinder-volume']['group']] }}" with_items: "{{ groups[cinder_services['cinder-volume']['group']] }}"
- name: Add in cinder devices types - name: Add in cinder devices types
shell: | ansible.builtin.shell: |
. {{ ansible_facts['env']['HOME'] }}/openrc . {{ ansible_facts['env']['HOME'] }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}" CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
if ! {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then if ! {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume type show "{{ item.key }}"; then
@ -54,7 +54,7 @@
changed_when: false changed_when: false
- name: Add extra cinder volume types - name: Add extra cinder volume types
shell: | ansible.builtin.shell: |
. {{ ansible_facts['env']['HOME'] }}/openrc . {{ ansible_facts['env']['HOME'] }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}" CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
{% for evtype in item.value.extra_volume_types %} {% for evtype in item.value.extra_volume_types %}
@ -74,7 +74,7 @@
when: item.value.extra_volume_types is defined when: item.value.extra_volume_types is defined
- name: Importing cinder_qos tasks - name: Importing cinder_qos tasks
import_tasks: cinder_qos.yml ansible.builtin.import_tasks: cinder_qos.yml
when: cinder_qos_specs is defined when: cinder_qos_specs is defined
tags: tags:
- cinder-qos - cinder-qos

View File

@ -17,7 +17,7 @@
# This file and the task calling it may be removed in Queens. # This file and the task calling it may be removed in Queens.
- name: Remove the old db_sync fact - name: Remove the old db_sync fact
ini_file: community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: cinder section: cinder
option: "need_db_sync" option: "need_db_sync"
@ -25,6 +25,6 @@
mode: "0644" mode: "0644"
- name: Refresh local facts - name: Refresh local facts
setup: ansible.builtin.setup:
filter: ansible_local filter: ansible_local
gather_subset: "!all" gather_subset: "!all"

View File

@ -16,7 +16,7 @@
- name: Perform data migrations if necessary and all cinder services are up - name: Perform data migrations if necessary and all cinder services are up
block: block:
- name: Perform online data migrations - name: Perform online data migrations
command: "{{ cinder_bin }}/cinder-manage db online_data_migrations" ansible.builtin.command: "{{ cinder_bin }}/cinder-manage db online_data_migrations"
register: data_migrations register: data_migrations
changed_when: false changed_when: false
retries: 5 retries: 5
@ -25,18 +25,18 @@
rescue: rescue:
- name: Check if all cinder services are up - name: Check if all cinder services are up
shell: "{{ cinder_bin }}/cinder-manage service list | /usr/bin/awk '{ if(NR>1) print $5 }' | /bin/egrep -vq ':-)'" ansible.builtin.shell: "{{ cinder_bin }}/cinder-manage service list | /usr/bin/awk '{ if(NR>1) print $5 }' | /bin/egrep -vq ':-)'"
register: failed_cinder_services register: failed_cinder_services
changed_when: false changed_when: false
ignore_errors: true ignore_errors: true
- name: Fail if any cinder service is down - name: Fail if any cinder service is down
fail: ansible.builtin.fail:
msg: At least one cinder service is down. You need to fix this before re-running the playbook. msg: At least one cinder service is down. You need to fix this before re-running the playbook.
when: failed_cinder_services.rc != 1 when: failed_cinder_services.rc != 1
- name: All cinder services are up, but migration failed nontheless. - name: All cinder services are up, but migration failed nontheless.
fail: ansible.builtin.fail:
msg: An unexpected error occured. msg: An unexpected error occured.
when: failed_cinder_services.rc == 1 when: failed_cinder_services.rc == 1
@ -47,7 +47,7 @@
- name: Disable the online migrations requirement - name: Disable the online migrations requirement
delegate_to: "{{ item }}" delegate_to: "{{ item }}"
ini_file: community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: cinder section: cinder
option: need_online_data_migrations option: need_online_data_migrations

View File

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

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Record the installation method - name: Record the installation method
ini_file: community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: "cinder" section: "cinder"
option: "install_method" option: "install_method"
@ -22,12 +22,12 @@
mode: "0644" mode: "0644"
- name: Refresh local facts to ensure the cinder section is present - name: Refresh local facts to ensure the cinder section is present
setup: ansible.builtin.setup:
filter: ansible_local filter: ansible_local
gather_subset: "!all" gather_subset: "!all"
- name: Install distro packages - name: Install distro packages
package: ansible.builtin.package:
name: "{{ cinder_package_list }}" name: "{{ cinder_package_list }}"
state: "{{ cinder_package_state }}" state: "{{ cinder_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
@ -40,11 +40,11 @@
- "Restart cinder services" - "Restart cinder services"
- name: Install cinder packages from PIP - name: Install cinder packages from PIP
import_tasks: cinder_install_source.yml ansible.builtin.import_tasks: cinder_install_source.yml
when: cinder_install_method == 'source' when: cinder_install_method == 'source'
- 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: "{{ cinder_system_user_name }}" systemd_user_name: "{{ cinder_system_user_name }}"
@ -65,7 +65,7 @@
when: cinder_install_method == 'distro' when: cinder_install_method == 'distro'
block: block:
- name: Record the osa version deployed - name: Record the osa version deployed
ini_file: community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: cinder section: cinder
option: venv_tag option: venv_tag
@ -73,7 +73,7 @@
mode: "0644" mode: "0644"
- name: Set the upgrade facts - name: Set the upgrade facts
ini_file: community.general.ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact" dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: cinder section: cinder
option: "{{ item }}" option: "{{ item }}"

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- 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: "{{ cinder_venv_python_executable }}" venv_python_executable: "{{ cinder_venv_python_executable }}"
@ -35,7 +35,7 @@
value: "{{ cinder_venv_tag }}" value: "{{ cinder_venv_tag }}"
- name: Link in the os-brick rootwrap filters - name: Link in the os-brick rootwrap filters
file: ansible.builtin.file:
src: "{{ cinder_bin | dirname }}/etc/os-brick/rootwrap.d/os-brick.filters" src: "{{ cinder_bin | dirname }}/etc/os-brick/rootwrap.d/os-brick.filters"
dest: /etc/cinder/rootwrap.d/os-brick.filters dest: /etc/cinder/rootwrap.d/os-brick.filters
state: link state: link

View File

@ -14,21 +14,21 @@
# limitations under the License. # limitations under the License.
- name: Discover lvm devices - name: Discover lvm devices
shell: >- ansible.builtin.shell: >-
/sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g' /sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g'
register: lvm_devices register: lvm_devices
changed_when: lvm_devices.rc != 0 changed_when: lvm_devices.rc != 0
failed_when: false failed_when: false
- name: Ensure "/etc/lvm" directory - name: Ensure "/etc/lvm" directory
file: ansible.builtin.file:
state: "directory" state: "directory"
path: "/etc/lvm" path: "/etc/lvm"
mode: "0755" mode: "0755"
when: lvm_devices.rc == 0 when: lvm_devices.rc == 0
- name: Drop lvm Config - name: Drop lvm Config
template: ansible.builtin.template:
src: "lvm.conf.j2" src: "lvm.conf.j2"
dest: "/etc/lvm/lvm.conf" dest: "/etc/lvm/lvm.conf"
owner: "root" owner: "root"

View File

@ -16,7 +16,7 @@
# NOTE(cloudnull): This task is required to copy rootwrap filters that we need # NOTE(cloudnull): This task is required to copy rootwrap filters that we need
# and cinder does not provide by default. # and cinder does not provide by default.
- name: Create aux cinder dir - name: Create aux cinder dir
file: ansible.builtin.file:
path: "/etc/cinder/rootwrap.d" path: "/etc/cinder/rootwrap.d"
state: "directory" state: "directory"
owner: "root" owner: "root"
@ -77,7 +77,7 @@
- cinder-policy-override - cinder-policy-override
- name: Remove legacy policy.yaml file - name: Remove legacy policy.yaml file
file: ansible.builtin.file:
path: "/etc/cinder/policy.yaml" path: "/etc/cinder/policy.yaml"
state: absent state: absent
when: when:
@ -89,13 +89,13 @@
# because we only want to copy the original files once. and we # because we only want to copy the original files once. and we
# don't want to need multiple tasks. # don't want to need multiple tasks.
- name: Preserve original configuration file(s) - name: Preserve original configuration file(s)
command: "cp {{ item.target_f }} {{ item.target_f }}.original" ansible.builtin.command: "cp {{ item.target_f }} {{ item.target_f }}.original"
args: args:
creates: "{{ item.target_f }}.original" creates: "{{ item.target_f }}.original"
with_items: "{{ cinder_core_files }}" with_items: "{{ cinder_core_files }}"
- name: Fetch override files - name: Fetch override files
fetch: ansible.builtin.fetch:
src: "{{ item.target_f }}.original" src: "{{ item.target_f }}.original"
dest: "{{ item.tmp_f }}" dest: "{{ item.tmp_f }}"
flat: true flat: true
@ -119,7 +119,7 @@
- Restart uwsgi services - Restart uwsgi services
- name: Cleanup fetched temp files - name: Cleanup fetched temp files
file: ansible.builtin.file:
path: "{{ item.tmp_f }}" path: "{{ item.tmp_f }}"
state: absent state: absent
changed_when: false changed_when: false
@ -129,7 +129,7 @@
# NOTE(cloudnull): This will ensure strong permissions on all rootwrap files. # NOTE(cloudnull): This will ensure strong permissions on all rootwrap files.
# NOTE(noonedeadpunk): X keeps execute permissions for rootwrap.d itself. # NOTE(noonedeadpunk): X keeps execute permissions for rootwrap.d itself.
- name: Set rootwrap.d permissions - name: Set rootwrap.d permissions
file: ansible.builtin.file:
path: "/etc/cinder/rootwrap.d" path: "/etc/cinder/rootwrap.d"
owner: "root" owner: "root"
group: "root" group: "root"
@ -137,7 +137,7 @@
recurse: true recurse: true
- name: Ensure cinder tgt include - name: Ensure cinder tgt include
lineinfile: ansible.builtin.lineinfile:
dest: /etc/tgt/targets.conf dest: /etc/tgt/targets.conf
line: "include /var/lib/cinder/volumes/*" line: "include /var/lib/cinder/volumes/*"
state: present state: present
@ -148,7 +148,7 @@
- cinder_backend_lvm_inuse | bool - cinder_backend_lvm_inuse | bool
- name: Ensure iscsi service is started - name: Ensure iscsi service is started
service: ansible.builtin.service:
name: "{{ tgt_service_name }}" name: "{{ tgt_service_name }}"
state: started state: started
enabled: true enabled: true
@ -160,7 +160,7 @@
# NOTE(jrosser) it is necessarry to start the iscsid service to # NOTE(jrosser) it is necessarry to start the iscsid service to
# generate an initiator uuid if one is not already present # generate an initiator uuid if one is not already present
- name: Ensure iscsid service is started - name: Ensure iscsid service is started
service: ansible.builtin.service:
name: "iscsid" name: "iscsid"
state: started state: started
enabled: true enabled: true
@ -169,7 +169,7 @@
- cinder_backend_lvm_inuse | bool - cinder_backend_lvm_inuse | bool
- name: Create nfs shares export file - name: Create nfs shares export file
template: ansible.builtin.template:
src: nfs_shares.j2 src: nfs_shares.j2
dest: "{{ item.value.nfs_shares_config }}" dest: "{{ item.value.nfs_shares_config }}"
mode: "0644" mode: "0644"
@ -181,7 +181,7 @@
- cinder-nfs - cinder-nfs
- name: Drop sudoers file - name: Drop sudoers file
template: ansible.builtin.template:
src: "sudoers.j2" src: "sudoers.j2"
dest: "/etc/sudoers.d/{{ cinder_system_user_name }}_sudoers" dest: "/etc/sudoers.d/{{ cinder_system_user_name }}_sudoers"
mode: "0440" mode: "0440"

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: "{{ cinder_system_group_name }}" name: "{{ cinder_system_group_name }}"
gid: "{{ cinder_system_group_gid | default(omit) }}" gid: "{{ cinder_system_group_gid | default(omit) }}"
state: "present" state: "present"
system: "yes" system: "yes"
- name: Create the cinder system user - name: Create the cinder system user
user: ansible.builtin.user:
name: "{{ cinder_system_user_name }}" name: "{{ cinder_system_user_name }}"
uid: "{{ cinder_system_user_uid | default(omit) }}" uid: "{{ cinder_system_user_uid | default(omit) }}"
group: "{{ cinder_system_group_name }}" group: "{{ cinder_system_group_name }}"
@ -38,12 +38,12 @@
- name: Source config block - name: Source config block
block: block:
- name: Stat config directory - name: Stat config directory
stat: ansible.builtin.stat:
path: "/etc/cinder" path: "/etc/cinder"
register: cinder_conf_dir_stat register: cinder_conf_dir_stat
- name: Remove the config directory - name: Remove the config directory
file: ansible.builtin.file:
path: "/etc/cinder" path: "/etc/cinder"
state: absent state: absent
when: when:
@ -53,7 +53,7 @@
- cinder_install_method == 'source' - cinder_install_method == 'source'
- name: Create cinder dir - name: Create cinder dir
file: ansible.builtin.file:
path: "{{ item.path | default(omit) }}" path: "{{ item.path | default(omit) }}"
src: "{{ item.src | default(omit) }}" src: "{{ item.src | default(omit) }}"
dest: "{{ item.dest | default(omit) }}" dest: "{{ item.dest | default(omit) }}"

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Add in cinder qos types - name: Add in cinder qos types
shell: | ansible.builtin.shell: |
. {{ ansible_facts['env']['HOME'] }}/openrc . {{ ansible_facts['env']['HOME'] }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}" CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
{{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume qos list --format value --column Name | grep -x {{ item.name }} || \ {{ __cinder_python_interpreter_dirname }}/openstack ${CLI_OPTIONS} volume qos list --format value --column Name | grep -x {{ item.name }} || \
@ -32,7 +32,7 @@
- cinder-qos - cinder-qos
- name: Associate qos types to volume types - name: Associate qos types to volume types
shell: | ansible.builtin.shell: |
. {{ ansible_facts['env']['HOME'] }}/openrc . {{ ansible_facts['env']['HOME'] }}/openrc
CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}" CLI_OPTIONS="{{ ((keystone_service_adminuri_insecure | bool) or (keystone_service_internaluri_insecure | bool)) | ternary('--insecure', '') }}"
{% for vtype in item.cinder_volume_types %} {% for vtype in item.cinder_volume_types %}

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: Fail if service was deployed using a different installation method - 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" msg: "Switching installation methods for OpenStack services is not supported"
when: when:
- ansible_local is defined - ansible_local is defined
@ -39,12 +39,12 @@
- ansible_local.openstack_ansible.cinder.install_method != cinder_install_method - ansible_local.openstack_ansible.cinder.install_method != cinder_install_method
- name: Gather variables for installation method - name: Gather variables for installation method
include_vars: "{{ cinder_install_method }}_install.yml" ansible.builtin.include_vars: "{{ cinder_install_method }}_install.yml"
tags: tags:
- 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:
@ -66,7 +66,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:
@ -92,7 +92,7 @@
- always - always
- name: Importing cinder_lvm_config tasks - name: Importing cinder_lvm_config tasks
import_tasks: cinder_lvm_config.yml ansible.builtin.import_tasks: cinder_lvm_config.yml
when: when:
- "cinder_services['cinder-volume']['group'] in group_names" - "cinder_services['cinder-volume']['group'] in group_names"
- "cinder_backend_lvm_inuse | bool" - "cinder_backend_lvm_inuse | bool"
@ -100,17 +100,17 @@
- cinder-config - cinder-config
- name: Importing cinder_pre_install tasks - name: Importing cinder_pre_install tasks
import_tasks: cinder_pre_install.yml ansible.builtin.import_tasks: cinder_pre_install.yml
tags: tags:
- cinder-install - cinder-install
- name: Importing cinder_install tasks - name: Importing cinder_install tasks
import_tasks: cinder_install.yml ansible.builtin.import_tasks: cinder_install.yml
tags: tags:
- cinder-install - cinder-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:
@ -130,14 +130,14 @@
- always - always
- name: Refresh local facts - name: Refresh local facts
setup: ansible.builtin.setup:
filter: ansible_local filter: ansible_local
gather_subset: "!all" gather_subset: "!all"
tags: tags:
- cinder-config - cinder-config
- name: Including cinder_cleanup_old_facts tasks - name: Including cinder_cleanup_old_facts tasks
include_tasks: cinder_cleanup_old_facts.yml ansible.builtin.include_tasks: cinder_cleanup_old_facts.yml
args: args:
apply: apply:
tags: tags:
@ -150,13 +150,13 @@
- always - always
- name: Importing cinder_post_install tasks - name: Importing cinder_post_install tasks
import_tasks: cinder_post_install.yml ansible.builtin.import_tasks: cinder_post_install.yml
tags: tags:
- cinder-config - cinder-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_service_enabled: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary(true, false) }}" systemd_service_enabled: "{{ ((cinder_services['cinder-volume']['group'] in group_names) and (cinder_ceilometer_enabled | bool)) | ternary(true, false) }}"
@ -181,14 +181,14 @@
- cinder-config - cinder-config
- name: Importing cinder_db_sync tasks - name: Importing cinder_db_sync tasks
import_tasks: cinder_db_sync.yml ansible.builtin.import_tasks: cinder_db_sync.yml
when: when:
- _cinder_is_first_api_play_host - _cinder_is_first_api_play_host
tags: tags:
- cinder-config - cinder-config
- name: Import uwsgi role - name: Import uwsgi role
import_role: ansible.builtin.import_role:
name: uwsgi name: uwsgi
vars: vars:
uwsgi_services: "{{ uwsgi_cinder_services }}" uwsgi_services: "{{ uwsgi_cinder_services }}"
@ -198,7 +198,7 @@
- uwsgi - uwsgi
- 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:
@ -223,7 +223,7 @@
- always - always
- name: Import ceph_client role - name: Import ceph_client role
import_role: ansible.builtin.import_role:
name: ceph_client name: ceph_client
vars: vars:
openstack_service_system_user: "{{ cinder_system_user_name }}" openstack_service_system_user: "{{ cinder_system_user_name }}"
@ -238,7 +238,7 @@
# so are installed after the ceph_client role is run to ensure that the ceph repos setup # so are installed after the ceph_client role is run to ensure that the ceph repos setup
# is in place. # is in place.
- name: Install cinder volumes distro tool packages - name: Install cinder volumes distro tool packages
package: ansible.builtin.package:
name: "{{ cinder_volume_distro_packages_tools }}" name: "{{ cinder_volume_distro_packages_tools }}"
state: "{{ cinder_package_state }}" state: "{{ cinder_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
@ -251,17 +251,16 @@
- "cinder_services['cinder-volume']['group'] in group_names" - "cinder_services['cinder-volume']['group'] in group_names"
- name: Flush handlers - name: Flush handlers
meta: flush_handlers ansible.builtin.meta: flush_handlers
- name: Importing cinder_db_post_setup tasks - name: Importing cinder_db_post_setup tasks
import_tasks: cinder_db_post_setup.yml ansible.builtin.import_tasks: cinder_db_post_setup.yml
when: when:
- "_cinder_is_last_play_host" - "_cinder_is_last_play_host"
tags: tags:
- cinder-config - cinder-config
- name: Importing cinder_backends tasks - name: Importing cinder_backends tasks
include_tasks: cinder_backends.yml ansible.builtin.include_tasks: cinder_backends.yml
args: args:
apply: apply:
tags: tags:
@ -274,7 +273,7 @@
- cinder-config - cinder-config
- name: Create service and timer for archiving deleted records - name: Create service and timer for archiving deleted records
include_role: ansible.builtin.include_role:
name: systemd_service name: systemd_service
vars: vars:
systemd_service_restart_changed: false systemd_service_restart_changed: false