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:
Dmitriy Rabotyagov 2023-07-14 16:32:20 +02:00
parent 36468adfac
commit 7226653ad9
12 changed files with 153 additions and 85 deletions

View File

@ -25,7 +25,11 @@ ironic_venv_python_executable: "{{ openstack_venv_python_executable | default('p
# for the service setup. The host must already have # for the service setup. The host must already have
# clouds.yaml properly configured. # clouds.yaml properly configured.
ironic_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" 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 # Set the package install state for distribution packages
# Options are 'present' and 'latest' # 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_inspector_git_repo: https://opendev.org/openstack/ironic-inspector
ironic_git_install_branch: master ironic_git_install_branch: master
ironic_inspector_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: ironic_git_constraints:
- "--constraint {{ ironic_upper_constraints_url }}" - "--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') }}" ironic_bmaas_bridge: "{{ container_networks[ironic_container_network_name]['bridge'] | default('bridge_undefined') }}"
# The address of this host on the bmaas network # 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'], ironic_bmaas_address: >-
container_networks[ironic_container_network_name]['address']) | default('address_undefined') }}" {{
(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 # 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 # 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, ironic_bmaas_interface: >-
container_networks[ironic_container_network_name]['interface']) | default('interface_undefined') }}" {{
(is_metal | default(False)) | ternary(
ironic_bmaas_bridge, container_networks[ironic_container_network_name]['interface']) | default('interface_undefined')
}}
# Ironic image store information # Ironic image store information
# #
@ -172,7 +184,11 @@ ironic_erase_devices_priority: 10
# Database # Database
ironic_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" 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_address: "{{ galera_address | default('127.0.0.1') }}"
ironic_galera_user: ironic ironic_galera_user: ironic
ironic_galera_database: ironic ironic_galera_database: ironic
@ -204,7 +220,10 @@ ironic_default_network_interface: "{{ (ironic_neutron_provisioning_network_uuid
ironic_auth_strategy: keystone ironic_auth_strategy: keystone
ironic_dhcp_provider: "{{ (ironic_standalone | bool) | ternary('none', 'neutron') }}" ironic_dhcp_provider: "{{ (ironic_standalone | bool) | ternary('none', 'neutron') }}"
ironic_sync_power_state_interval: "{{ (ironic_standalone | bool) | ternary('-1', '60') }}" 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 # Common configuration
ironic_node_name: ironic ironic_node_name: ironic
@ -298,7 +317,8 @@ ironic_service_user_name: "ironic"
# WSGI settings # WSGI settings
ironic_wsgi_threads: 1 ironic_wsgi_threads: 1
ironic_wsgi_processes_max: 16 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_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
ironic_uwsgi_tls: ironic_uwsgi_tls:
crt: "{{ ironic_ssl_cert }}" 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_project_name: "service"
ironic_inspector_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}" ironic_inspector_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
ironic_inspector_service_domain_id: default 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 # Database
ironic_inspector_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" 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_address: "{{ galera_address | default('127.0.0.1') }}"
ironic_inspector_galera_user: ironic-inspector ironic_inspector_galera_user: ironic-inspector
ironic_inspector_galera_database: ironic_inspector ironic_inspector_galera_database: ironic_inspector
@ -430,7 +455,11 @@ ironic_extra_deploy_image_list: []
# Ironic inspector # Ironic inspector
ironic_inspector_enable_discovery: True 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 # define this to adjust the inspector processing hooks
# Example: # 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_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_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_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
ironic_inspector_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}" ironic_inspector_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
ironic_inspector_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}" ironic_inspector_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"

View File

@ -18,19 +18,21 @@ galaxy_info:
description: Baremetal provisioning for Openstack description: Baremetal provisioning for Openstack
company: OpenStack company: OpenStack
license: Apache license: Apache
min_ansible_version: 2.2 role_name: os_ironic
namespace: openstack
min_ansible_version: "2.10"
platforms: platforms:
- name: Debian - name: Debian
versions: versions:
- buster - bullseye
- name: Ubuntu - name: Ubuntu
versions: versions:
- bionic
- focal - focal
- jammy
- name: EL - name: EL
versions: versions:
- 8 - "9"
categories: galaxy_tags:
- cloud - cloud
- baremetal - baremetal
- system - system

View File

@ -17,6 +17,7 @@
copy: copy:
src: "dhcpd.conf" src: "dhcpd.conf"
dest: "/etc/dhcp/" dest: "/etc/dhcp/"
mode: "0644"
when: ironic_standalone when: ironic_standalone
notify: notify:
- Restart isc-dhcp-server - Restart isc-dhcp-server
@ -33,6 +34,7 @@
template: template:
src: "tftpd-hpa.j2" src: "tftpd-hpa.j2"
dest: "/etc/default/tftpd-hpa" dest: "/etc/default/tftpd-hpa"
mode: "0644"
when: when:
- ansible_facts['os_family'] == 'Debian' - ansible_facts['os_family'] == 'Debian'
notify: notify:
@ -42,6 +44,7 @@
template: template:
src: "map-file" src: "map-file"
dest: "{{ ironic_tftpd_root }}/map-file" dest: "{{ ironic_tftpd_root }}/map-file"
mode: "0644"
notify: notify:
- Restart tftpd - Restart tftpd
@ -50,6 +53,7 @@
src: "{{ item }}" src: "{{ item }}"
dest: "{{ ironic_tftpd_root }}/" dest: "{{ ironic_tftpd_root }}/"
remote_src: True remote_src: True
mode: "0644"
with_items: "{{ ironic_library_modules_paths }}" with_items: "{{ ironic_library_modules_paths }}"
- name: Ensure grub directory exists in tftpboot - name: Ensure grub directory exists in tftpboot
@ -71,12 +75,14 @@
src: "{{ item.path }}" src: "{{ item.path }}"
dest: "{{ ironic_tftpd_root }}/{{ item.name }}" dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
remote_src: True remote_src: True
mode: "0644"
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('path', 'defined') | list }}" with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('path', 'defined') | list }}"
- name: Copy content into tftpboot (urls) - name: Copy content into tftpboot (urls)
get_url: get_url:
url: "{{ item.url }}" url: "{{ item.url }}"
dest: "{{ ironic_tftpd_root }}/{{ item.name }}" dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
mode: "0644"
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('url', 'defined') | list }}" with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('url', 'defined') | list }}"
- name: Start up tftp - name: Start up tftp
@ -105,6 +111,7 @@
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: "0755"
when: "ironic_ipxe_enabled | bool" when: "ironic_ipxe_enabled | bool"
with_items: with_items:
- "/etc/nginx/{{ ironic_nginx_conf_path }}" - "/etc/nginx/{{ ironic_nginx_conf_path }}"
@ -113,6 +120,7 @@
template: template:
src: ironic-ipxe.conf.j2 src: ironic-ipxe.conf.j2
dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf" dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf"
mode: "0644"
when: "ironic_ipxe_enabled | bool" when: "ironic_ipxe_enabled | bool"
notify: notify:
- Restart web server - Restart web server

View File

@ -35,6 +35,7 @@
url: "{{ item['url'] }}" url: "{{ item['url'] }}"
dest: "{{ ironic_deploy_image_path }}" dest: "{{ ironic_deploy_image_path }}"
checksum: "sha256:{{ item['sha_url'] }}" checksum: "sha256:{{ item['sha_url'] }}"
mode: "0644"
retries: 10 retries: 10
delay: 10 delay: 10
register: ironic_download_results register: ironic_download_results

View File

@ -17,6 +17,7 @@
template: template:
src: pxelinux-default.j2 src: pxelinux-default.j2
dest: "{{ ironic_inspector_tftpboot_dir }}/pxelinux.cfg/default" dest: "{{ ironic_inspector_tftpboot_dir }}/pxelinux.cfg/default"
mode: "0644"
- name: Copy Inspector iPXE Configuration - name: Copy Inspector iPXE Configuration
template: template:
@ -24,6 +25,7 @@
dest: "{{ ironic_http_root }}/inspector.ipxe" dest: "{{ ironic_http_root }}/inspector.ipxe"
owner: "{{ ironic_system_user_name }}" owner: "{{ ironic_system_user_name }}"
group: "{{ ironic_system_group_name }}" group: "{{ ironic_system_group_name }}"
mode: "0644"
- name: Download IPA Images - name: Download IPA Images
get_url: get_url:
@ -57,6 +59,7 @@
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: "0755"
with_items: with_items:
- "/etc/nginx/{{ ironic_nginx_conf_path }}" - "/etc/nginx/{{ ironic_nginx_conf_path }}"
@ -64,6 +67,7 @@
template: template:
src: ironic-ipxe.conf.j2 src: ironic-ipxe.conf.j2
dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf" dest: "/etc/nginx/{{ ironic_nginx_conf_path }}/ironic-ipxe.conf"
mode: "0644"
notify: notify:
- Restart web server - Restart web server

View File

@ -17,6 +17,7 @@
template: template:
src: "dhcpd.conf.j2" src: "dhcpd.conf.j2"
dest: "/etc/dhcp/dhcpd.conf" dest: "/etc/dhcp/dhcpd.conf"
mode: "0644"
when: ironic_inspector_dhcp_type == "isc_dhcp" when: ironic_inspector_dhcp_type == "isc_dhcp"
notify: notify:
- Restart isc-dhcp-server - Restart isc-dhcp-server

View File

@ -23,6 +23,7 @@
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }} post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
environment: environment:
OS_ENDPOINT_TYPE: internalURL OS_ENDPOINT_TYPE: internalURL
changed_when: false
when: when:
- not ironic_enable_web_server_for_images | bool - not ironic_enable_web_server_for_images | bool
- _ironic_api_is_first_play_host - _ironic_api_is_first_play_host
@ -40,6 +41,7 @@
stat -v | awk '/StorageURL\:/ {print $2}' stat -v | awk '/StorageURL\:/ {print $2}'
environment: environment:
OS_ENDPOINT_TYPE: internalURL OS_ENDPOINT_TYPE: internalURL
changed_when: false
register: swift_storage_url register: swift_storage_url
when: when:
- not ironic_enable_web_server_for_images | bool - not ironic_enable_web_server_for_images | bool
@ -148,6 +150,7 @@
dest: "/etc/ironic/rootwrap.d/" dest: "/etc/ironic/rootwrap.d/"
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644"
with_fileglob: with_fileglob:
- rootwrap.d/* - rootwrap.d/*
notify: notify:

View File

@ -28,7 +28,7 @@
tags: tags:
- always - 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: setup:
gather_subset: "!all,network" gather_subset: "!all,network"
filter: "{{ dynamic_address_gather_filter | default(('ansible_' ~ default_network_interface_name) | replace('-','_')) }}" filter: "{{ dynamic_address_gather_filter | default(('ansible_' ~ default_network_interface_name) | replace('-','_')) }}"
@ -40,7 +40,8 @@
tags: tags:
- always - always
- include_role: - name: Including osa.db_setup role
include_role:
name: openstack.osa.db_setup name: openstack.osa.db_setup
apply: apply:
tags: tags:
@ -61,7 +62,8 @@
tags: tags:
- always - always
- include_role: - name: Including osa.db_setup role
include_role:
name: openstack.osa.db_setup name: openstack.osa.db_setup
apply: apply:
tags: tags:
@ -82,7 +84,8 @@
tags: tags:
- always - always
- include_role: - name: Including osa.mq_setup role
include_role:
name: openstack.osa.mq_setup name: openstack.osa.mq_setup
apply: apply:
tags: tags:
@ -104,7 +107,8 @@
tags: tags:
- always - always
- import_tasks: ironic_pre_install.yml - name: Importing ironic_pre_install tasks
import_tasks: ironic_pre_install.yml
tags: tags:
- ironic-install - ironic-install
@ -147,7 +151,8 @@
tags: tags:
- ironic-install - ironic-install
- import_tasks: ironic_post_install.yml - name: Importing ironic_post_install tasks
import_tasks: ironic_post_install.yml
tags: tags:
- ironic-config - ironic-config
@ -161,16 +166,19 @@
- ironic-config - ironic-config
- uwsgi - 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" when: "ironic_services['ironic-conductor']['group'] in group_names"
tags: tags:
- ironic-config - ironic-config
- import_tasks: ironic_db_setup.yml - name: Importing ironic_db_setup tasks
import_tasks: ironic_db_setup.yml
tags: tags:
- ironic-config - 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'] when: inventory_hostname in groups['ironic_inspector']
tags: tags:
- ironic-inspector - ironic-inspector
@ -184,16 +192,17 @@
systemd_tempd_prefix: openstack systemd_tempd_prefix: openstack
systemd_slice_name: "{{ ironic_system_slice_name }}" systemd_slice_name: "{{ ironic_system_slice_name }}"
systemd_lock_dir: "{{ ironic_lock_dir }}" systemd_lock_dir: "{{ ironic_lock_dir }}"
systemd_CPUAccounting: true systemd_service_cpu_accounting: true
systemd_BlockIOAccounting: true systemd_service_block_io_accounting: true
systemd_MemoryAccounting: true systemd_service_memory_accounting: true
systemd_TasksAccounting: true systemd_service_tasks_accounting: true
systemd_services: "{{ filtered_ironic_services }}" systemd_services: "{{ filtered_ironic_services }}"
tags: tags:
- ironic-config - ironic-config
- systemd-service - systemd-service
- include_role: - name: Including osa.service_setup role
include_role:
name: openstack.osa.service_setup name: openstack.osa.service_setup
apply: apply:
tags: tags:
@ -213,12 +222,14 @@
tags: tags:
- always - 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'] when: inventory_hostname in groups['ironic_inspector']
tags: tags:
- ironic-inspector - ironic-inspector
- include_tasks: ironic_deploy_image.yml - name: Including ironic_deploy_image tasks
include_tasks: ironic_deploy_image.yml
args: args:
apply: apply:
tags: tags:

View File

@ -13,8 +13,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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_api_is_first_play_host: >-
_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_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 # This special list brings together all of the package installations into one
# task to save time. # task to save time.
@ -133,7 +141,7 @@ ironic_driver_types:
console: no-console console: no-console
raid: no-raid raid: no-raid
ironic_packages_list: > ironic_packages_list: |-
{%- set package_list = [] %} {%- set package_list = [] %}
{%- if ironic_services['ironic-api']['group'] in group_names %} {%- if ironic_services['ironic-api']['group'] in group_names %}
{%- set package_list = package_list + ironic_api_distro_packages %} {%- set package_list = package_list + ironic_api_distro_packages %}