Apply linters autofix to the role
We combine this patch with switch Manila jobs to Noble in order to resolve the conflict and fix CI for the role. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/948255 Change-Id: Id63a340123f31dc1f214126fe9f702673fb3b3f8
This commit is contained in:
@@ -53,7 +53,7 @@ manila_default_availability_zone: "{{ manila_storage_availability_zone }}"
|
||||
manila_management_address: 127.0.0.1
|
||||
manila_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||
|
||||
manila_fatal_deprecations: False
|
||||
manila_fatal_deprecations: false
|
||||
|
||||
## Database info
|
||||
manila_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||
@@ -307,7 +307,7 @@ manila_services:
|
||||
service_name: manila-api
|
||||
init_config_overrides: "{{ manila_api_init_overrides }}"
|
||||
start_order: 4
|
||||
wsgi_app: True
|
||||
wsgi_app: true
|
||||
wsgi_name: manila-wsgi
|
||||
uwsgi_overrides: "{{ manila_api_uwsgi_ini_overrides }}"
|
||||
uwsgi_port: "{{ manila_service_port }}"
|
||||
@@ -356,7 +356,7 @@ manila_pki_setup_host: "{{ openstack_pki_setup_host | default('localhost') }}"
|
||||
manila_pki_keys_path: "{{ manila_pki_dir ~ '/certs/private/' }}"
|
||||
manila_pki_certs_path: "{{ manila_pki_dir ~ '/certs/certs/' }}"
|
||||
manila_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}"
|
||||
manila_pki_regen_cert: ''
|
||||
manila_pki_regen_cert: ""
|
||||
manila_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
|
||||
manila_pki_certificates:
|
||||
- name: "manila_{{ ansible_facts['hostname'] }}"
|
||||
|
@@ -14,11 +14,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Stop services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: stopped
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
with_items: "{{ filtered_manila_services }}"
|
||||
register: _stop
|
||||
until: _stop is success
|
||||
@@ -31,11 +31,11 @@
|
||||
- "cert installed"
|
||||
|
||||
- name: Start services
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.service_name }}"
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: "started"
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
with_items: "{{ filtered_manila_services }}"
|
||||
register: _start
|
||||
until: _start is success
|
||||
|
@@ -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:
|
||||
@@ -30,7 +30,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
|
||||
@@ -40,33 +40,33 @@
|
||||
- ansible_local['openstack_ansible']['manila']['install_method'] != manila_install_method
|
||||
|
||||
- name: Check for rpc password
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
The optiton "manila_oslomsg_rpc_password" is not defined
|
||||
when:
|
||||
- manila_oslomsg_rpc_password is undefined
|
||||
|
||||
- name: Check for mysql password
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
The optiton "manila_container_mysql_password" is not defined
|
||||
when:
|
||||
- manila_container_mysql_password is undefined
|
||||
|
||||
- name: Check for service password
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
The optiton "manila_service_password" is not defined
|
||||
when:
|
||||
- manila_service_password is undefined
|
||||
|
||||
- name: Gather variables for installation method
|
||||
include_vars: "{{ manila_install_method }}_install.yml"
|
||||
ansible.builtin.include_vars: "{{ manila_install_method }}_install.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Importing manila_lvm_config tasks
|
||||
import_tasks: manila_lvm_config.yml
|
||||
ansible.builtin.import_tasks: manila_lvm_config.yml
|
||||
when:
|
||||
- manila_services['manila-share']['group'] in group_names
|
||||
- manila_backend_lvm_inuse | bool
|
||||
@@ -74,7 +74,7 @@
|
||||
- manila-config
|
||||
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -96,7 +96,7 @@
|
||||
- always
|
||||
|
||||
- name: Including osa.mq_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.mq_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -122,17 +122,17 @@
|
||||
- always
|
||||
|
||||
- name: Importing manila_pre_install tasks
|
||||
import_tasks: manila_pre_install.yml
|
||||
ansible.builtin.import_tasks: manila_pre_install.yml
|
||||
tags:
|
||||
- manila-install
|
||||
|
||||
- name: Importing manila_install tasks
|
||||
import_tasks: manila_install.yml
|
||||
ansible.builtin.import_tasks: manila_install.yml
|
||||
tags:
|
||||
- manila-install
|
||||
|
||||
- name: Create and install SSL certificates
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: pki
|
||||
tasks_from: main_certs.yml
|
||||
apply:
|
||||
@@ -152,13 +152,13 @@
|
||||
- always
|
||||
|
||||
- name: Importing manila_post_install tasks
|
||||
import_tasks: manila_post_install.yml
|
||||
ansible.builtin.import_tasks: manila_post_install.yml
|
||||
tags:
|
||||
- manila-config
|
||||
- post-install
|
||||
|
||||
- name: Importing manila_keys tasks
|
||||
import_tasks: manila_keys.yml
|
||||
ansible.builtin.import_tasks: manila_keys.yml
|
||||
when:
|
||||
- manila_keypair_path is defined
|
||||
- manila_services['manila-share']['group'] in group_names
|
||||
@@ -166,14 +166,14 @@
|
||||
- manila-config
|
||||
|
||||
- name: Including manila_db_sync tasks
|
||||
include_tasks: manila_db_sync.yml
|
||||
ansible.builtin.include_tasks: manila_db_sync.yml
|
||||
when:
|
||||
- _manila_is_first_play_host
|
||||
tags:
|
||||
- manila-config
|
||||
|
||||
- name: Import uwsgi role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: uwsgi
|
||||
vars:
|
||||
uwsgi_services: "{{ uwsgi_manila_services }}"
|
||||
@@ -185,7 +185,7 @@
|
||||
- uwsgi
|
||||
|
||||
- name: Importing ceph_client role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: ceph_client
|
||||
vars:
|
||||
openstack_service_system_user: "{{ manila_system_user_name }}"
|
||||
@@ -197,7 +197,7 @@
|
||||
- ceph
|
||||
|
||||
- name: Including osa.service_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -228,17 +228,17 @@
|
||||
- always
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Create singular manila_backends variable for all hosts
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
_manila_backends: "{{ (_manila_backends | default(manila_backends)) | combine(hostvars[item]['manila_backends'] | default({})) }}"
|
||||
with_items: "{{ groups[manila_services['manila-share']['group']] }}"
|
||||
tags:
|
||||
- manila-config
|
||||
|
||||
- name: Importing manila_backends tasks
|
||||
import_tasks: manila_backends.yml
|
||||
ansible.builtin.import_tasks: manila_backends.yml
|
||||
when:
|
||||
- groups[manila_services['manila-share']['group']] | length > 0
|
||||
- _manila_share_is_first_play_host
|
||||
|
@@ -18,9 +18,8 @@
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ manila_service_setup_host_python_interpreter }}"
|
||||
block:
|
||||
|
||||
- name: Ensure manila api is available
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "{{ manila_service_internaluri }}"
|
||||
status_code: 200,300
|
||||
validate_certs: "{{ manila_service_internaluri_insecure | bool }}"
|
||||
@@ -30,7 +29,7 @@
|
||||
delay: 10
|
||||
|
||||
- name: Add in manila devices types
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||
CLI_OPTIONS="--os-interface internal {{ ((keystone_service_adminuri_insecure | bool) or (manila_service_internaluri_insecure | bool)) | ternary(
|
||||
'--insecure', '')
|
||||
|
@@ -14,14 +14,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Perform a manila DB sync
|
||||
command: "{{ manila_bin }}/manila-manage db sync"
|
||||
become: yes
|
||||
ansible.builtin.command: "{{ manila_bin }}/manila-manage db sync"
|
||||
become: true
|
||||
become_user: "{{ manila_system_user_name }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Perform online data migrations
|
||||
command: "{{ manila_bin }}/manila-manage db online_data_migrations"
|
||||
become: yes
|
||||
ansible.builtin.command: "{{ manila_bin }}/manila-manage db online_data_migrations"
|
||||
become: true
|
||||
become_user: "{{ manila_system_user_name }}"
|
||||
when:
|
||||
- (manila_all_software_updated | default(false)) | bool
|
||||
@@ -30,7 +30,7 @@
|
||||
register: data_migrations
|
||||
|
||||
- name: Disable the online migrations requirement
|
||||
ini_file:
|
||||
community.general.ini_file:
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: manila
|
||||
option: need_online_data_migrations
|
||||
|
@@ -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: "manila"
|
||||
option: "install_method"
|
||||
@@ -22,12 +22,12 @@
|
||||
mode: "0644"
|
||||
|
||||
- name: Refresh local facts to ensure the manila section is present
|
||||
setup:
|
||||
ansible.builtin.setup:
|
||||
filter: ansible_local
|
||||
gather_subset: "!all"
|
||||
|
||||
- name: Install distro packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ manila_package_list }}"
|
||||
state: "{{ manila_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
@@ -38,7 +38,7 @@
|
||||
delay: 2
|
||||
|
||||
- name: Install the python venv
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_python_executable: "{{ manila_venv_python_executable }}"
|
||||
@@ -57,7 +57,7 @@
|
||||
when: manila_install_method == 'source'
|
||||
|
||||
- name: Run the systemd service role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: systemd_service
|
||||
vars:
|
||||
systemd_user_name: "{{ manila_system_user_name }}"
|
||||
@@ -90,7 +90,7 @@
|
||||
- systemd-service
|
||||
|
||||
- name: Set the upgrade facts
|
||||
ini_file:
|
||||
community.general.ini_file:
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: manila
|
||||
option: "{{ item }}"
|
||||
|
@@ -2,11 +2,11 @@
|
||||
- name: Create SSH keypair
|
||||
run_once: true
|
||||
delegate_to: localhost
|
||||
openssh_keypair:
|
||||
community.crypto.openssh_keypair:
|
||||
path: "{{ manila_keypair_path }}"
|
||||
|
||||
- name: Distribute SSH keypair
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/manila/{{ item | basename }}"
|
||||
owner: "{{ manila_system_user_name }}"
|
||||
|
@@ -14,14 +14,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Discover lvm devices
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
/sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g'
|
||||
register: lvm_devices
|
||||
changed_when: lvm_devices.rc != 0
|
||||
failed_when: false
|
||||
|
||||
- name: Ensure "/etc/lvm" directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
state: "directory"
|
||||
path: "/etc/lvm"
|
||||
mode: "0755"
|
||||
@@ -29,7 +29,7 @@
|
||||
- lvm_devices.rc == 0
|
||||
|
||||
- name: Drop lvm Config
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "lvm.conf.j2"
|
||||
dest: "/etc/lvm/lvm.conf"
|
||||
owner: "root"
|
||||
|
@@ -14,10 +14,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Fetch rootwrap files
|
||||
fetch:
|
||||
ansible.builtin.fetch:
|
||||
src: "{{ item.source }}"
|
||||
dest: "{{ item.src }}"
|
||||
flat: yes
|
||||
flat: true
|
||||
changed_when: false
|
||||
with_items: "{{ manila_rootwrap_files }}"
|
||||
run_once: true
|
||||
@@ -51,7 +51,7 @@
|
||||
- manila-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "/etc/manila/policy.yaml"
|
||||
state: absent
|
||||
when:
|
||||
@@ -60,7 +60,7 @@
|
||||
- manila-policy-override
|
||||
|
||||
- name: Drop sudoers file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "sudoers.j2"
|
||||
dest: "/etc/sudoers.d/{{ manila_system_user_name }}_sudoers"
|
||||
mode: "0440"
|
||||
|
@@ -14,14 +14,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create the system group
|
||||
group:
|
||||
ansible.builtin.group:
|
||||
name: "{{ manila_system_group_name }}"
|
||||
gid: "{{ manila_system_group_gid | default(omit) }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
|
||||
- name: Create the manila system user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ manila_system_user_name }}"
|
||||
uid: "{{ manila_system_user_uid | default(omit) }}"
|
||||
group: "{{ manila_system_group_name }}"
|
||||
@@ -32,7 +32,7 @@
|
||||
home: "{{ manila_system_home_folder }}"
|
||||
|
||||
- name: Create manila dir
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner | default(manila_system_user_name) }}"
|
||||
|
@@ -70,4 +70,4 @@ manila_oslomsg_amqp1_distro_packages:
|
||||
- libsasl2-modules
|
||||
- sasl2-bin
|
||||
|
||||
manila_uwsgi_bin: '/usr/bin'
|
||||
manila_uwsgi_bin: "/usr/bin"
|
||||
|
@@ -57,4 +57,4 @@ manila_oslomsg_amqp1_distro_packages:
|
||||
- cyrus-sasl-plain
|
||||
- cyrus-sasl-md5
|
||||
|
||||
manila_uwsgi_bin: '/usr/sbin'
|
||||
manila_uwsgi_bin: "/usr/sbin"
|
||||
|
@@ -21,7 +21,7 @@
|
||||
- build-release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- openstack-ansible-deploy-aio_metal-ubuntu-jammy
|
||||
- openstack-ansible-deploy-aio_metal-ubuntu-noble
|
||||
# NOTE(noonedeadpunk): Fails with OOM
|
||||
- openstack-ansible-deploy-aio_metal-centos-9-stream:
|
||||
voting: false
|
||||
@@ -29,4 +29,4 @@
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-ansible-deploy-aio_metal-ubuntu-jammy
|
||||
- openstack-ansible-deploy-aio_metal-ubuntu-noble
|
||||
|
Reference in New Issue
Block a user