Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new linters were added, that enabled by default. In order to comply with linter rules we're applying changes to the role. With that we also update metdata to reflect current state. Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223 Change-Id: I1ab9664505068c20924370790322caa67cc6e022
This commit is contained in:
parent
36468adfac
commit
7226653ad9
@ -25,7 +25,11 @@ ironic_venv_python_executable: "{{ openstack_venv_python_executable | default('p
|
||||
# for the service setup. The host must already have
|
||||
# clouds.yaml properly configured.
|
||||
ironic_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
ironic_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((ironic_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
ironic_service_setup_host_python_interpreter: >-
|
||||
{{
|
||||
openstack_service_setup_host_python_interpreter | default(
|
||||
(ironic_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||
}}
|
||||
|
||||
# Set the package install state for distribution packages
|
||||
# Options are 'present' and 'latest'
|
||||
@ -35,7 +39,8 @@ ironic_git_repo: https://opendev.org/openstack/ironic
|
||||
ironic_inspector_git_repo: https://opendev.org/openstack/ironic-inspector
|
||||
ironic_git_install_branch: master
|
||||
ironic_inspector_git_install_branch: master
|
||||
ironic_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
|
||||
ironic_upper_constraints_url: >-
|
||||
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
|
||||
ironic_git_constraints:
|
||||
- "--constraint {{ ironic_upper_constraints_url }}"
|
||||
|
||||
@ -125,12 +130,19 @@ ironic_container_network_name: "bmaas_address"
|
||||
ironic_bmaas_bridge: "{{ container_networks[ironic_container_network_name]['bridge'] | default('bridge_undefined') }}"
|
||||
|
||||
# The address of this host on the bmaas network
|
||||
ironic_bmaas_address: "{{ (is_metal | default(False)) | ternary(ansible_facts[ironic_bmaas_bridge | replace('-','_')]['ipv4']['address'],
|
||||
container_networks[ironic_container_network_name]['address']) | default('address_undefined') }}"
|
||||
ironic_bmaas_address: >-
|
||||
{{
|
||||
(is_metal | default(False)) | ternary(
|
||||
ansible_facts[ironic_bmaas_bridge | replace('-','_')]['ipv4']['address'],
|
||||
container_networks[ironic_container_network_name]['address']) | default('address_undefined')
|
||||
}}
|
||||
# The name of the interface on the bmaas network
|
||||
# This is the bmaas bridge name on metal, or the corresponding interface name in a container
|
||||
ironic_bmaas_interface: "{{ (is_metal | default(False)) | ternary(ironic_bmaas_bridge,
|
||||
container_networks[ironic_container_network_name]['interface']) | default('interface_undefined') }}"
|
||||
ironic_bmaas_interface: >-
|
||||
{{
|
||||
(is_metal | default(False)) | ternary(
|
||||
ironic_bmaas_bridge, container_networks[ironic_container_network_name]['interface']) | default('interface_undefined')
|
||||
}}
|
||||
|
||||
# Ironic image store information
|
||||
#
|
||||
@ -172,7 +184,11 @@ ironic_erase_devices_priority: 10
|
||||
|
||||
# Database
|
||||
ironic_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||
ironic_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((ironic_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
ironic_db_setup_python_interpreter: >-
|
||||
{{
|
||||
openstack_db_setup_python_interpreter | default(
|
||||
(ironic_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||
}}
|
||||
ironic_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||
ironic_galera_user: ironic
|
||||
ironic_galera_database: ironic
|
||||
@ -204,7 +220,10 @@ ironic_default_network_interface: "{{ (ironic_neutron_provisioning_network_uuid
|
||||
ironic_auth_strategy: keystone
|
||||
ironic_dhcp_provider: "{{ (ironic_standalone | bool) | ternary('none', 'neutron') }}"
|
||||
ironic_sync_power_state_interval: "{{ (ironic_standalone | bool) | ternary('-1', '60') }}"
|
||||
ironic_db_connection_string: "mysql+pymysql://{{ ironic_galera_user }}:{{ ironic_container_mysql_password }}@{{ ironic_galera_address }}:{{ ironic_galera_port }}/ironic?charset=utf8{% if ironic_galera_use_ssl | bool %}&ssl_verify_cert=true{% if ironic_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ ironic_galera_ssl_ca_cert }}{% endif %}{% endif %}"
|
||||
ironic_db_connection_string: >-
|
||||
mysql+pymysql://{{ ironic_galera_user }}:{{ ironic_container_mysql_password }}@{{ ironic_galera_address }}:{{ ironic_galera_port
|
||||
}}/ironic?charset=utf8{% if ironic_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
||||
if ironic_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ ironic_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
||||
|
||||
# Common configuration
|
||||
ironic_node_name: ironic
|
||||
@ -298,7 +317,8 @@ ironic_service_user_name: "ironic"
|
||||
# WSGI settings
|
||||
ironic_wsgi_threads: 1
|
||||
ironic_wsgi_processes_max: 16
|
||||
ironic_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, ironic_wsgi_processes_max] | min }}"
|
||||
ironic_wsgi_processes: >-
|
||||
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, ironic_wsgi_processes_max] | min }}
|
||||
ironic_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||
ironic_uwsgi_tls:
|
||||
crt: "{{ ironic_ssl_cert }}"
|
||||
@ -364,11 +384,16 @@ ironic_inspector_service_token_roles_required: "{{ openstack_service_token_roles
|
||||
ironic_inspector_service_project_name: "service"
|
||||
ironic_inspector_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
||||
ironic_inspector_service_domain_id: default
|
||||
ironic_inspector_callback_url: "{{ ironic_inspector_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ ironic_inspector_service_port }}/v1/continue"
|
||||
ironic_inspector_callback_url: >-
|
||||
{{ ironic_inspector_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ ironic_inspector_service_port }}/v1/continue
|
||||
|
||||
# Database
|
||||
ironic_inspector_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||
ironic_inspector_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((ironic_inspector_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
ironic_inspector_db_setup_python_interpreter: >-
|
||||
{{
|
||||
openstack_db_setup_python_interpreter | default(
|
||||
(ironic_inspector_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||
}}
|
||||
ironic_inspector_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||
ironic_inspector_galera_user: ironic-inspector
|
||||
ironic_inspector_galera_database: ironic_inspector
|
||||
@ -430,7 +455,11 @@ ironic_extra_deploy_image_list: []
|
||||
|
||||
# Ironic inspector
|
||||
ironic_inspector_enable_discovery: True
|
||||
ironic_inspector_openstack_db_connection_string: "mysql+pymysql://{{ ironic_inspector_galera_user }}:{{ ironic_inspector_container_mysql_password }}@{{ ironic_inspector_galera_address }}:{{ ironic_inspector_galera_port }}/{{ ironic_inspector_galera_database }}?charset=utf8{% if ironic_inspector_galera_use_ssl | bool %}&ssl_verify_cert=true{% if ironic_inspector_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ ironic_inspector_galera_ssl_ca_cert }}{% endif %}{% endif %}"
|
||||
ironic_inspector_openstack_db_connection_string: >-
|
||||
mysql+pymysql://{{ ironic_inspector_galera_user }}:{{ ironic_inspector_container_mysql_password }}@{{ ironic_inspector_galera_address -}}:{{
|
||||
ironic_inspector_galera_port }}/{{ ironic_inspector_galera_database }}?charset=utf8{%
|
||||
if ironic_inspector_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
||||
if ironic_inspector_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ ironic_inspector_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
||||
|
||||
# define this to adjust the inspector processing hooks
|
||||
# Example:
|
||||
@ -481,7 +510,8 @@ ironic_inspector_oslomsg_rpc_ssl_version: "{{ oslomsg_rpc_ssl_version | default(
|
||||
ironic_inspector_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
|
||||
|
||||
ironic_inspector_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
|
||||
ironic_inspector_oslomsg_notify_setup_host: "{{ (ironic_inspector_oslomsg_notify_host_group in groups) | ternary(groups[ironic_inspector_oslomsg_notify_host_group][0], 'localhost') }}"
|
||||
ironic_inspector_oslomsg_notify_setup_host: >-
|
||||
{{ (ironic_inspector_oslomsg_notify_host_group in groups) | ternary(groups[ironic_inspector_oslomsg_notify_host_group][0], 'localhost') }}
|
||||
ironic_inspector_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
|
||||
ironic_inspector_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
|
||||
ironic_inspector_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
|
||||
|
@ -18,19 +18,21 @@ galaxy_info:
|
||||
description: Baremetal provisioning for Openstack
|
||||
company: OpenStack
|
||||
license: Apache
|
||||
min_ansible_version: 2.2
|
||||
role_name: os_ironic
|
||||
namespace: openstack
|
||||
min_ansible_version: "2.10"
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- buster
|
||||
- bullseye
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- bionic
|
||||
- focal
|
||||
- jammy
|
||||
- name: EL
|
||||
versions:
|
||||
- 8
|
||||
categories:
|
||||
- "9"
|
||||
galaxy_tags:
|
||||
- cloud
|
||||
- baremetal
|
||||
- system
|
||||
|
@ -17,6 +17,7 @@
|
||||
copy:
|
||||
src: "dhcpd.conf"
|
||||
dest: "/etc/dhcp/"
|
||||
mode: "0644"
|
||||
when: ironic_standalone
|
||||
notify:
|
||||
- Restart isc-dhcp-server
|
||||
@ -33,6 +34,7 @@
|
||||
template:
|
||||
src: "tftpd-hpa.j2"
|
||||
dest: "/etc/default/tftpd-hpa"
|
||||
mode: "0644"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'Debian'
|
||||
notify:
|
||||
@ -42,6 +44,7 @@
|
||||
template:
|
||||
src: "map-file"
|
||||
dest: "{{ ironic_tftpd_root }}/map-file"
|
||||
mode: "0644"
|
||||
notify:
|
||||
- Restart tftpd
|
||||
|
||||
@ -50,6 +53,7 @@
|
||||
src: "{{ item }}"
|
||||
dest: "{{ ironic_tftpd_root }}/"
|
||||
remote_src: True
|
||||
mode: "0644"
|
||||
with_items: "{{ ironic_library_modules_paths }}"
|
||||
|
||||
- name: Ensure grub directory exists in tftpboot
|
||||
@ -71,12 +75,14 @@
|
||||
src: "{{ item.path }}"
|
||||
dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
|
||||
remote_src: True
|
||||
mode: "0644"
|
||||
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('path', 'defined') | list }}"
|
||||
|
||||
- name: Copy content into tftpboot (urls)
|
||||
get_url:
|
||||
url: "{{ item.url }}"
|
||||
dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
|
||||
mode: "0644"
|
||||
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('url', 'defined') | list }}"
|
||||
|
||||
- name: Start up tftp
|
||||
@ -105,6 +111,7 @@
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: "ironic_ipxe_enabled | bool"
|
||||
with_items:
|
||||
- "/etc/nginx/{{ ironic_nginx_conf_path }}"
|
||||
@ -113,6 +120,7 @@
|
||||
template:
|
||||
src: ironic-ipxe.conf.j2
|
||||
dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf"
|
||||
mode: "0644"
|
||||
when: "ironic_ipxe_enabled | bool"
|
||||
notify:
|
||||
- Restart web server
|
||||
|
@ -35,6 +35,7 @@
|
||||
url: "{{ item['url'] }}"
|
||||
dest: "{{ ironic_deploy_image_path }}"
|
||||
checksum: "sha256:{{ item['sha_url'] }}"
|
||||
mode: "0644"
|
||||
retries: 10
|
||||
delay: 10
|
||||
register: ironic_download_results
|
||||
|
@ -17,6 +17,7 @@
|
||||
template:
|
||||
src: pxelinux-default.j2
|
||||
dest: "{{ ironic_inspector_tftpboot_dir }}/pxelinux.cfg/default"
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy Inspector iPXE Configuration
|
||||
template:
|
||||
@ -24,6 +25,7 @@
|
||||
dest: "{{ ironic_http_root }}/inspector.ipxe"
|
||||
owner: "{{ ironic_system_user_name }}"
|
||||
group: "{{ ironic_system_group_name }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Download IPA Images
|
||||
get_url:
|
||||
@ -57,6 +59,7 @@
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
with_items:
|
||||
- "/etc/nginx/{{ ironic_nginx_conf_path }}"
|
||||
|
||||
@ -64,6 +67,7 @@
|
||||
template:
|
||||
src: ironic-ipxe.conf.j2
|
||||
dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf"
|
||||
mode: "0644"
|
||||
notify:
|
||||
- Restart web server
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
template:
|
||||
src: "dhcpd.conf.j2"
|
||||
dest: "/etc/dhcp/dhcpd.conf"
|
||||
mode: "0644"
|
||||
when: ironic_inspector_dhcp_type == "isc_dhcp"
|
||||
notify:
|
||||
- Restart isc-dhcp-server
|
||||
|
@ -23,6 +23,7 @@
|
||||
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
|
||||
environment:
|
||||
OS_ENDPOINT_TYPE: internalURL
|
||||
changed_when: false
|
||||
when:
|
||||
- not ironic_enable_web_server_for_images | bool
|
||||
- _ironic_api_is_first_play_host
|
||||
@ -40,6 +41,7 @@
|
||||
stat -v | awk '/StorageURL\:/ {print $2}'
|
||||
environment:
|
||||
OS_ENDPOINT_TYPE: internalURL
|
||||
changed_when: false
|
||||
register: swift_storage_url
|
||||
when:
|
||||
- not ironic_enable_web_server_for_images | bool
|
||||
@ -148,6 +150,7 @@
|
||||
dest: "/etc/ironic/rootwrap.d/"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
with_fileglob:
|
||||
- rootwrap.d/*
|
||||
notify:
|
||||
|
@ -28,7 +28,7 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Gathering facts for {{ ironic_container_network_name }} interface on metal hosts
|
||||
- name: Gathering facts on metal hosts for interface {{ ironic_container_network_name }}
|
||||
setup:
|
||||
gather_subset: "!all,network"
|
||||
filter: "{{ dynamic_address_gather_filter | default(('ansible_' ~ default_network_interface_name) | replace('-','_')) }}"
|
||||
@ -40,7 +40,8 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
@ -61,7 +62,8 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
@ -82,7 +84,8 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.mq_setup role
|
||||
include_role:
|
||||
name: openstack.osa.mq_setup
|
||||
apply:
|
||||
tags:
|
||||
@ -104,7 +107,8 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: ironic_pre_install.yml
|
||||
- name: Importing ironic_pre_install tasks
|
||||
import_tasks: ironic_pre_install.yml
|
||||
tags:
|
||||
- ironic-install
|
||||
|
||||
@ -147,7 +151,8 @@
|
||||
tags:
|
||||
- ironic-install
|
||||
|
||||
- import_tasks: ironic_post_install.yml
|
||||
- name: Importing ironic_post_install tasks
|
||||
import_tasks: ironic_post_install.yml
|
||||
tags:
|
||||
- ironic-config
|
||||
|
||||
@ -161,16 +166,19 @@
|
||||
- ironic-config
|
||||
- uwsgi
|
||||
|
||||
- import_tasks: ironic_conductor_post_install.yml
|
||||
- name: Importing ironic_conductor_post_install tasks
|
||||
import_tasks: ironic_conductor_post_install.yml
|
||||
when: "ironic_services['ironic-conductor']['group'] in group_names"
|
||||
tags:
|
||||
- ironic-config
|
||||
|
||||
- import_tasks: ironic_db_setup.yml
|
||||
- name: Importing ironic_db_setup tasks
|
||||
import_tasks: ironic_db_setup.yml
|
||||
tags:
|
||||
- ironic-config
|
||||
|
||||
- import_tasks: ironic_inspector_pre_install.yml
|
||||
- name: Importing ironic_inspector_pre_install tasks
|
||||
import_tasks: ironic_inspector_pre_install.yml
|
||||
when: inventory_hostname in groups['ironic_inspector']
|
||||
tags:
|
||||
- ironic-inspector
|
||||
@ -184,16 +192,17 @@
|
||||
systemd_tempd_prefix: openstack
|
||||
systemd_slice_name: "{{ ironic_system_slice_name }}"
|
||||
systemd_lock_dir: "{{ ironic_lock_dir }}"
|
||||
systemd_CPUAccounting: true
|
||||
systemd_BlockIOAccounting: true
|
||||
systemd_MemoryAccounting: true
|
||||
systemd_TasksAccounting: true
|
||||
systemd_service_cpu_accounting: true
|
||||
systemd_service_block_io_accounting: true
|
||||
systemd_service_memory_accounting: true
|
||||
systemd_service_tasks_accounting: true
|
||||
systemd_services: "{{ filtered_ironic_services }}"
|
||||
tags:
|
||||
- ironic-config
|
||||
- systemd-service
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.service_setup role
|
||||
include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
@ -213,12 +222,14 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: ironic_inspector_post_install.yml
|
||||
- name: Importing ironic_inspector_post_install tasks
|
||||
import_tasks: ironic_inspector_post_install.yml
|
||||
when: inventory_hostname in groups['ironic_inspector']
|
||||
tags:
|
||||
- ironic-inspector
|
||||
|
||||
- include_tasks: ironic_deploy_image.yml
|
||||
- name: Including ironic_deploy_image tasks
|
||||
include_tasks: ironic_deploy_image.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
|
@ -13,8 +13,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ironic_api_is_first_play_host: "{{ (ironic_services['ironic-api']['group'] in group_names and inventory_hostname == (groups[ironic_services['ironic-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
||||
_ironic_inspector_is_first_play_host: "{{ (ironic_services['ironic-inspector']['group'] in group_names and inventory_hostname == (groups[ironic_services['ironic-inspector']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
||||
_ironic_api_is_first_play_host: >-
|
||||
{{
|
||||
(ironic_services['ironic-api']['group'] in group_names and
|
||||
inventory_hostname == (groups[ironic_services['ironic-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||
}}
|
||||
_ironic_inspector_is_first_play_host: >-
|
||||
{{
|
||||
(ironic_services['ironic-inspector']['group'] in group_names and
|
||||
inventory_hostname == (groups[ironic_services['ironic-inspector']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||
}}
|
||||
|
||||
# This special list brings together all of the package installations into one
|
||||
# task to save time.
|
||||
@ -133,7 +141,7 @@ ironic_driver_types:
|
||||
console: no-console
|
||||
raid: no-raid
|
||||
|
||||
ironic_packages_list: >
|
||||
ironic_packages_list: |-
|
||||
{%- set package_list = [] %}
|
||||
{%- if ironic_services['ironic-api']['group'] in group_names %}
|
||||
{%- set package_list = package_list + ironic_api_distro_packages %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user