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

@ -18,14 +18,18 @@
# Verbosity Options
debug: False
#python venv executable
# python venv executable
ironic_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
# Set the host which will execute the shade modules
# 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
@ -199,12 +215,15 @@ ironic_keystone_auth_plugin: password
# ironic_neutron_inspection_network_name: "Name of inspection network in neutron"
# Integrated Openstack configuration
ironic_enabled_network_interfaces_list: "flat,noop{{ (ironic_neutron_provisioning_network_uuid is defined) | ternary(',neutron','') }}"
ironic_default_network_interface: "{{ (ironic_neutron_provisioning_network_uuid is defined) | ternary('neutron','flat') }}"
ironic_enabled_network_interfaces_list: "flat,noop{{ (ironic_neutron_provisioning_network_uuid is defined) | ternary(',neutron', '') }}"
ironic_default_network_interface: "{{ (ironic_neutron_provisioning_network_uuid is defined) | ternary('neutron', 'flat') }}"
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
@ -397,7 +422,7 @@ ironic_inspector_swift_role_names:
- _member_
- swiftoperator
#Ironic deploy images need to be uploaded to glance.
# Ironic deploy images need to be uploaded to glance.
ironic_deploy_image_glance_upload: True
# Set the directory where the downloaded image will be stored
@ -406,37 +431,41 @@ ironic_deploy_image_glance_upload: True
ironic_deploy_image_path: "/root/openstack-ansible/ironic"
ironic_deploy_image_path_owner: "root"
#The default download URL is like https://tarballs.opendev.org/openstack/ironic-python-agent/dib/files/ipa-centos8-stable-xena.initramfs
#Allow various parts of this to be overidden to local mirrors, or replaced completely with custom settings
# The default download URL is like https://tarballs.opendev.org/openstack/ironic-python-agent/dib/files/ipa-centos8-stable-xena.initramfs
# Allow various parts of this to be overidden to local mirrors, or replaced completely with custom settings
ironic_deploy_image_server: "https://tarballs.opendev.org/"
ironic_deploy_image_server_path: "openstack/ironic-python-agent/dib/files/"
ironic_deploy_image_base_name: "ipa-centos9-stable-2023.1"
ironic_deploy_image_kernel_name: "{{ ironic_deploy_image_base_name + '.kernel' }}"
ironic_deploy_image_initramfs_name: "{{ ironic_deploy_image_base_name + '.initramfs' }}"
ironic_deploy_image_list:
- url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_kernel_name }}"
sha_url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_kernel_name ~ '.sha256' }}"
container_format: 'aki'
disk_format: 'aki'
name: "{{ ironic_deploy_image_kernel_name }}"
- url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_initramfs_name }}"
sha_url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_initramfs_name ~ '.sha256' }}"
container_format: 'ari'
disk_format: 'ari'
name: "{{ ironic_deploy_image_initramfs_name }}"
- url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_kernel_name }}"
sha_url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_kernel_name ~ '.sha256' }}"
container_format: 'aki'
disk_format: 'aki'
name: "{{ ironic_deploy_image_kernel_name }}"
- url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_initramfs_name }}"
sha_url: "{{ ironic_deploy_image_server ~ ironic_deploy_image_server_path ~ ironic_deploy_image_initramfs_name ~ '.sha256' }}"
container_format: 'ari'
disk_format: 'ari'
name: "{{ ironic_deploy_image_initramfs_name }}"
#allow user defined extra images to upload
# allow user defined extra images to upload
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:
#ironic_inspector_processing_hooks: "$default_processing_hooks,lldp_basic,local_link_connection"
# define this to adjust the inspector processing hooks
# Example:
# ironic_inspector_processing_hooks: "$default_processing_hooks,lldp_basic,local_link_connection"
#pass additional kernel paramters to the deploy image
# pass additional kernel paramters to the deploy image
ironic_inspector_extra_callback_parameters: ''
# Ironic inspector dhcp
@ -451,7 +480,7 @@ ironic_inspector_dhcp_nameservers: 192.168.0.1
ironic_inspector_dhcp_lease_time: 600
ironic_inspector_dhcp_type: dnsmasq # isc_dhcp
ironic_inspector_boot_mode: http #tftp
ironic_inspector_boot_mode: http # tftp
ironic_inspector_pxe_boot_mode: "{{ ironic_inspector_boot_mode }}"
ironic_inspector_httpboot_dir: "{{ ironic_http_root }}"
ironic_inspector_tftpboot_dir: "{{ ironic_tftpd_root }}"
@ -465,9 +494,9 @@ ironic_inspector_rootwrap_conf_overrides: {}
ironic_inspector_init_config_overrides: {}
ironic_inspector_dnsmasq_init_config_overrides: {}
# pxe boot
ironic_inspector_pxe_append_params: "ipa-debug=1 systemd.journald.forward_to_console=yes" #ipa-inspection-collectors=default,logs,extra_hardware
ironic_inspector_pxe_append_params: "ipa-debug=1 systemd.journald.forward_to_console=yes" # ipa-inspection-collectors=default,logs,extra_hardware
ironic_inspector_pxe_filter: dnsmasq #iptables
ironic_inspector_pxe_filter: dnsmasq # iptables
ironic_inspector_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
ironic_inspector_oslomsg_rpc_setup_host: "{{ (ironic_oslomsg_rpc_host_group in groups) | ternary(groups[ironic_oslomsg_rpc_host_group][0], 'localhost') }}"
@ -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') }}"
@ -541,5 +571,5 @@ ironic_pki_install_certificates:
mode: "0600"
# Define user-provided SSL certificates
#ironic_user_ssl_cert: <path to cert on ansible deployment host>
#ironic_user_ssl_key: <path to cert on ansible deployment host>
# ironic_user_ssl_cert: <path to cert on ansible deployment host>
# ironic_user_ssl_key: <path to cert on ansible deployment host>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
@ -87,8 +89,8 @@
openstack.config_template.config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ item.owner|default(ironic_system_user_name) }}"
group: "{{ item.group|default(ironic_system_group_name) }}"
owner: "{{ item.owner | default(ironic_system_user_name) }}"
group: "{{ item.group | default(ironic_system_group_name) }}"
mode: "0644"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
@ -148,6 +150,7 @@
dest: "/etc/ironic/rootwrap.d/"
owner: "root"
group: "root"
mode: "0644"
with_fileglob:
- rootwrap.d/*
notify:

View File

@ -44,9 +44,9 @@
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner|default(ironic_system_user_name) }}"
group: "{{ item.group|default(ironic_system_group_name) }}"
mode: "{{ item.mode|default('0755') }}"
owner: "{{ item.owner | default(ironic_system_user_name) }}"
group: "{{ item.group | default(ironic_system_group_name) }}"
mode: "{{ item.mode | default('0755') }}"
when: item.condition | default(True)
with_items:
- { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" }

View File

@ -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:

View File

@ -61,25 +61,25 @@ ironic_tftpd_service_name: tftpd-hpa
ironic_tftpd_root: /tftpboot
ironic_inspector_distro_packages:
- libxml2-dev
- pxelinux
- syslinux
- syslinux-common
- syslinux-efi
- libxslt1-dev
- libpq-dev
- python3-yaml
- ipmitool
- libxml2-dev
- pxelinux
- syslinux
- syslinux-common
- syslinux-efi
- libxslt1-dev
- libpq-dev
- python3-yaml
- ipmitool
ironic_inspector_http_distro_packages:
- nginx
- nginx
ironic_inspector_isc_dhcp_distro_packages:
- tftpd-hpa
- isc-dhcp-server
- tftpd-hpa
- isc-dhcp-server
ironic_inspector_dnsmasq_distro_packages:
- dnsmasq
- dnsmasq
ironic_inspector_standalone_distro_packages:
- isc-dhcp-server

View File

@ -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 %}

View File

@ -58,14 +58,14 @@ ironic_tftpd_service_name: tftp
ironic_tftpd_root: /var/lib/tftpboot
ironic_inspector_http_distro_packages:
- nginx
- nginx
ironic_inspector_isc_dhcp_distro_packages:
- tftpd-hpa
- isc-dhcp-server
- tftpd-hpa
- isc-dhcp-server
ironic_inspector_dnsmasq_distro_packages:
- dnsmasq
- dnsmasq
ironic_inspector_standalone_distro_packages:
- isc-dhcp-server