Introduce max fail percentage to playbooks
This allows us to continue execution until a certain proportion of hosts fail. This can be useful at scale, where failures are common, and restarting a deployment is time-consuming. The default max failure percentage is 100, keeping the default behaviour. A global max failure percentage may be set via kayobe_max_fail_percentage, and individual playbooks may define a max failure percentage via <playbook>_max_fail_percentage. Related Kolla Ansible patch: https://review.opendev.org/c/openstack/kolla-ansible/+/805598 Change-Id: Ib81c72b63be5765cca664c38141ffc769640cf07
This commit is contained in:
parent
3b0a74dfc4
commit
6c54ce4d3b
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure AppArmor is disabled for containerised libvirt
|
- name: Ensure AppArmor is disabled for containerised libvirt
|
||||||
hosts: compute
|
hosts: compute
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ apparmor_libvirt_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- apparmor-libvirt
|
- apparmor-libvirt
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure APT is configured
|
- name: Ensure APT is configured
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ apt_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
tags:
|
tags:
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
- name: Ensure baremetal compute nodes are inspected in ironic
|
- name: Ensure baremetal compute nodes are inspected in ironic
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_inspect_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
controller_host: "{{ groups['controllers'][0] }}"
|
controller_host: "{{ groups['controllers'][0] }}"
|
||||||
venv: "{{ virtualenv_path }}/openstacksdk"
|
venv: "{{ virtualenv_path }}/openstacksdk"
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
- name: Ensure the baremetal compute nodes' hardware introspection data is saved
|
- name: Ensure the baremetal compute nodes' hardware introspection data is saved
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_introspection_data_save_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
venv: "{{ virtualenv_path }}/openstack-cli"
|
venv: "{{ virtualenv_path }}/openstack-cli"
|
||||||
controller_host: "{{ groups['controllers'][0] }}"
|
controller_host: "{{ groups['controllers'][0] }}"
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
- name: Ensure baremetal compute nodes are manageable in ironic
|
- name: Ensure baremetal compute nodes are manageable in ironic
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_manage_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
venv: "{{ virtualenv_path }}/openstacksdk"
|
venv: "{{ virtualenv_path }}/openstacksdk"
|
||||||
ansible_python_interpreter: "{{ venv }}/bin/python"
|
ansible_python_interpreter: "{{ venv }}/bin/python"
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
- name: Ensure baremetal compute nodes are available in ironic
|
- name: Ensure baremetal compute nodes are available in ironic
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_provide_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
venv: "{{ virtualenv_path }}/openstacksdk"
|
venv: "{{ virtualenv_path }}/openstacksdk"
|
||||||
ansible_python_interpreter: "{{ venv }}/bin/python"
|
ansible_python_interpreter: "{{ venv }}/bin/python"
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
- name: Ensure baremetal compute nodes are registered in ironic
|
- name: Ensure baremetal compute nodes are registered in ironic
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_register_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- baremetal
|
- baremetal
|
||||||
vars:
|
vars:
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
- name: Rename baremetal compute nodes
|
- name: Rename baremetal compute nodes
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_rename_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
venv: "{{ virtualenv_path }}/openstack-cli"
|
venv: "{{ virtualenv_path }}/openstack-cli"
|
||||||
controller_host: "{{ groups['controllers'][0] }}"
|
controller_host: "{{ groups['controllers'][0] }}"
|
||||||
|
@ -53,6 +53,11 @@
|
|||||||
- name: Enable serial console
|
- name: Enable serial console
|
||||||
hosts: "{{ console_compute_node_limit | default('baremetal-compute') }}"
|
hosts: "{{ console_compute_node_limit | default('baremetal-compute') }}"
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ baremetal_compute_serial_console_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
venv: "{{ virtualenv_path }}/openstack-cli"
|
venv: "{{ virtualenv_path }}/openstack-cli"
|
||||||
controller_host: "{{ groups['controllers'][0] }}"
|
controller_host: "{{ groups['controllers'][0] }}"
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure the libvirt daemon is configured
|
- name: Ensure the libvirt daemon is configured
|
||||||
hosts: compute
|
hosts: compute
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ compute_libvirt_host_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- libvirt-host
|
- libvirt-host
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
- name: Ensure baremetal compute nodes are PXE booted
|
- name: Ensure baremetal compute nodes are PXE booted
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ compute_node_discovery_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
controller_host: "{{ groups['controllers'][0] }}"
|
controller_host: "{{ groups['controllers'][0] }}"
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
- name: Ensure Dell baremetal compute nodes boot mode is set
|
- name: Ensure Dell baremetal compute nodes boot mode is set
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dell_compute_node_boot_mode_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# Set this to the required boot mode. One of 'bios' or 'uefi'.
|
# Set this to the required boot mode. One of 'bios' or 'uefi'.
|
||||||
drac_boot_mode: "bios"
|
drac_boot_mode: "bios"
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
- name: Ensure Dell baremetal compute nodes are PXE booted
|
- name: Ensure Dell baremetal compute nodes are PXE booted
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dell_compute_node_discovery_max_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# Set this to the index of the inteface on which to enable PXE.
|
# Set this to the index of the inteface on which to enable PXE.
|
||||||
drac_pxe_interface: 1
|
drac_pxe_interface: 1
|
||||||
|
@ -28,6 +28,11 @@
|
|||||||
- name: Ensure Dell baremetal compute nodes are present in the Ansible inventory
|
- name: Ensure Dell baremetal compute nodes are present in the Ansible inventory
|
||||||
hosts: baremetal-compute
|
hosts: baremetal-compute
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dell_compute_node_inventory_fail_percentage |
|
||||||
|
default(baremetal_compute_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
compute_node_limit: ""
|
compute_node_limit: ""
|
||||||
compute_node_limit_list: "{{ compute_node_limit.split(':') }}"
|
compute_node_limit_list: "{{ compute_node_limit.split(':') }}"
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure development tools are installed
|
- name: Ensure development tools are installed
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dev_tools_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- dev-tools
|
- dev-tools
|
||||||
roles:
|
roles:
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
# and cause some issues in network configuration
|
# and cause some issues in network configuration
|
||||||
- name: Disable Cloud-init service
|
- name: Disable Cloud-init service
|
||||||
hosts: overcloud:infra-vms
|
hosts: overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ disable_cloud_init_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- disable-cloud-init
|
- disable-cloud-init
|
||||||
roles:
|
roles:
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
# interfaces. In some cases this can lead to timeouts.
|
# interfaces. In some cases this can lead to timeouts.
|
||||||
- name: Ensure Glean is disabled and its artifacts are removed
|
- name: Ensure Glean is disabled and its artifacts are removed
|
||||||
hosts: seed:overcloud:infra-vms
|
hosts: seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ disable_glean_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- disable-glean
|
- disable-glean
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure DNF repos are configured
|
- name: Ensure DNF repos are configured
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dnf_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure docker is configured
|
- name: Ensure docker is configured
|
||||||
hosts: docker
|
hosts: docker
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ docker_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
- name: Ensure that overcloud nodes' BIOS are configured
|
- name: Ensure that overcloud nodes' BIOS are configured
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ drac_bios_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
bios_config:
|
bios_config:
|
||||||
OneTimeBootMode: "OneTimeBootSeq"
|
OneTimeBootMode: "OneTimeBootSeq"
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
- name: Ensure that overcloud nodes' boot order is configured
|
- name: Ensure that overcloud nodes' boot order is configured
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ drac_boot_order_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
ansible_host: "{{ ipmi_address }}"
|
ansible_host: "{{ ipmi_address }}"
|
||||||
ansible_user: "{{ ipmi_username }}"
|
ansible_user: "{{ ipmi_username }}"
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
- name: Gather and display BIOS and RAID facts from iDRACs
|
- name: Gather and display BIOS and RAID facts from iDRACs
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ drac_facts_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
# The role simply pulls in the drac_facts module.
|
# The role simply pulls in the drac_facts module.
|
||||||
- role: stackhpc.drac-facts
|
- role: stackhpc.drac-facts
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
- name: Dump configuration from one or more hosts
|
- name: Dump configuration from one or more hosts
|
||||||
hosts: "{{ dump_hosts }}"
|
hosts: "{{ dump_hosts }}"
|
||||||
gather_facts: "{{ dump_facts }}"
|
gather_facts: "{{ dump_facts }}"
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ dump_config_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- dump-config
|
- dump-config
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure /etc/hosts is configured
|
- name: Ensure /etc/hosts is configured
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ etc_hosts_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- etc-hosts
|
- etc-hosts
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure firewall is configured
|
- name: Ensure firewall is configured
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ firewall_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- firewall
|
- firewall
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Run a command
|
- name: Run a command
|
||||||
gather_facts: False
|
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ host_command_run_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run a command
|
- name: Run a command
|
||||||
shell: "{{ host_command_to_run }}"
|
shell: "{{ host_command_to_run }}"
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Update host packages
|
- name: Update host packages
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ host_package_update_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# Optionally set this to a list of packages to update. Default behaviour is
|
# Optionally set this to a list of packages to update. Default behaviour is
|
||||||
# to update all packages.
|
# to update all packages.
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
- name: Ensure defined infra VMs are destroyed
|
- name: Ensure defined infra VMs are destroyed
|
||||||
hosts: hypervisors
|
hosts: hypervisors
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ infra_vm_deprovision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- infra-vm-deprovision
|
- infra-vm-deprovision
|
||||||
tasks:
|
tasks:
|
||||||
@ -27,6 +31,10 @@
|
|||||||
- name: Set facts about infra VMs
|
- name: Set facts about infra VMs
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
hosts: "{{ infra_vm_limit | default('infra-vms') }}"
|
hosts: "{{ infra_vm_limit | default('infra-vms') }}"
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ infra_vm_deprovision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- infra-vm-deprovision
|
- infra-vm-deprovision
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
- name: Ensure defined infra VMs are deployed
|
- name: Ensure defined infra VMs are deployed
|
||||||
hosts: hypervisors
|
hosts: hypervisors
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ infra_vm_provision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- infra-vm-provision
|
- infra-vm-provision
|
||||||
tasks:
|
tasks:
|
||||||
@ -26,6 +30,10 @@
|
|||||||
- name: Wait for infra VMs to be accessible
|
- name: Wait for infra VMs to be accessible
|
||||||
hosts: "{{ infra_vm_limit | default('infra-vms') }}"
|
hosts: "{{ infra_vm_limit | default('infra-vms') }}"
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ infra_vm_provision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- infra-vm-provision
|
- infra-vm-provision
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure IP addresses are allocated
|
- name: Ensure IP addresses are allocated
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ ip_allocation_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- ip-allocation
|
- ip-allocation
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
|
|
||||||
- name: Ensure IP routing is enabled
|
- name: Ensure IP routing is enabled
|
||||||
hosts: seed-hypervisor:seed
|
hosts: seed-hypervisor:seed
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ ip_routing_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- ip-routing
|
- ip-routing
|
||||||
roles:
|
roles:
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
- name: Determine whether user bootstrapping is required
|
- name: Determine whether user bootstrapping is required
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kayobe_ansible_user_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kayobe-ansible-user
|
- kayobe-ansible-user
|
||||||
tasks:
|
tasks:
|
||||||
@ -31,15 +36,24 @@
|
|||||||
attempting bootstrap
|
attempting bootstrap
|
||||||
when: ssh_result.unreachable | default(false)
|
when: ssh_result.unreachable | default(false)
|
||||||
|
|
||||||
- name: Ensure python is installed
|
- name: Ensure python is installed and the Kayobe Ansible user account exists
|
||||||
hosts: kayobe_user_bootstrap_required_True
|
hosts: kayobe_user_bootstrap_required_True
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kayobe_ansible_user_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
ansible_user: "{{ bootstrap_user }}"
|
ansible_user: "{{ bootstrap_user }}"
|
||||||
|
# We can't assume that a virtualenv exists at this point, so use the system
|
||||||
|
# python interpreter.
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
dnf_options:
|
dnf_options:
|
||||||
- "-y"
|
- "-y"
|
||||||
- "{% if 'proxy' in dnf_config %}--setopt=proxy={{ dnf_config['proxy'] }}{% endif %}"
|
- "{% if 'proxy' in dnf_config %}--setopt=proxy={{ dnf_config['proxy'] }}{% endif %}"
|
||||||
tags:
|
tags:
|
||||||
|
- kayobe-ansible-user
|
||||||
- ensure-python
|
- ensure-python
|
||||||
tasks:
|
tasks:
|
||||||
- name: Check if python is installed
|
- name: Check if python is installed
|
||||||
@ -53,29 +67,19 @@
|
|||||||
raw: "test -e /usr/bin/apt && (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo dnf {{ dnf_options | select | join(' ') }} install python3)"
|
raw: "test -e /usr/bin/apt && (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo dnf {{ dnf_options | select | join(' ') }} install python3)"
|
||||||
when: check_python.rc != 0
|
when: check_python.rc != 0
|
||||||
|
|
||||||
- name: Ensure the Kayobe Ansible user account exists
|
- import_role:
|
||||||
hosts: kayobe_user_bootstrap_required_True
|
name: singleplatform-eng.users
|
||||||
gather_facts: false
|
vars:
|
||||||
tags:
|
groups_to_create: "{{ [{'name': 'docker'}] if 'docker' in group_names else [] }}"
|
||||||
- kayobe-ansible-user
|
users:
|
||||||
vars:
|
- username: "{{ kayobe_ansible_user }}"
|
||||||
ansible_user: "{{ bootstrap_user }}"
|
name: Kayobe deployment user
|
||||||
# We can't assume that a virtualenv exists at this point, so use the system
|
groups: "{{ ['docker'] if 'docker' in group_names else [] }}"
|
||||||
# python interpreter.
|
append: True
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ssh_key:
|
||||||
roles:
|
- "{{ lookup('file', ssh_public_key_path) }}"
|
||||||
- role: singleplatform-eng.users
|
|
||||||
groups_to_create: "{{ [{'name': 'docker'}] if 'docker' in group_names else [] }}"
|
|
||||||
users:
|
|
||||||
- username: "{{ kayobe_ansible_user }}"
|
|
||||||
name: Kayobe deployment user
|
|
||||||
groups: "{{ ['docker'] if 'docker' in group_names else [] }}"
|
|
||||||
append: True
|
|
||||||
ssh_key:
|
|
||||||
- "{{ lookup('file', ssh_public_key_path) }}"
|
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: Ensure the Kayobe Ansible user has passwordless sudo
|
- name: Ensure the Kayobe Ansible user has passwordless sudo
|
||||||
copy:
|
copy:
|
||||||
content: "{{ kayobe_ansible_user }} ALL=(ALL) NOPASSWD: ALL"
|
content: "{{ kayobe_ansible_user }} ALL=(ALL) NOPASSWD: ALL"
|
||||||
@ -86,6 +90,11 @@
|
|||||||
- name: Verify that the Kayobe Ansible user account is accessible
|
- name: Verify that the Kayobe Ansible user account is accessible
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kayobe_ansible_user_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kayobe-ansible-user
|
- kayobe-ansible-user
|
||||||
vars:
|
vars:
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
- name: Ensure a virtualenv exists for kayobe
|
- name: Ensure a virtualenv exists for kayobe
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kayobe_target_venv_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kayobe-target-venv
|
- kayobe-target-venv
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
- name: Ensure the Kolla Ansible user account exists
|
- name: Ensure the Kolla Ansible user account exists
|
||||||
hosts: seed:overcloud
|
hosts: seed:overcloud
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kolla_ansible_user_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kolla-ansible
|
- kolla-ansible
|
||||||
- kolla-ansible-user
|
- kolla-ansible-user
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
- name: Ensure the Bifrost overcloud inventory is populated
|
- name: Ensure the Bifrost overcloud inventory is populated
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kolla_bifrost_hostvars_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kolla-bifrost-hostvars
|
- kolla-bifrost-hostvars
|
||||||
become: true
|
become: true
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure Kolla Ansible packages are installed
|
- name: Ensure Kolla Ansible packages are installed
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kolla_packages_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kolla-packages
|
- kolla-packages
|
||||||
vars:
|
vars:
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
- name: Configure local PyPi mirror for Kolla Ansible
|
- name: Configure local PyPi mirror for Kolla Ansible
|
||||||
hosts: seed:overcloud
|
hosts: seed:overcloud
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kolla_pip_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- kolla-ansible
|
- kolla-ansible
|
||||||
- kolla-pip
|
- kolla-pip
|
||||||
|
@ -5,6 +5,11 @@
|
|||||||
- name: Ensure a virtualenv exists for kolla-ansible
|
- name: Ensure a virtualenv exists for kolla-ansible
|
||||||
hosts: seed:overcloud
|
hosts: seed:overcloud
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ kolla_target_venv_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# kolla_overcloud_inventory_top_level_group_map looks like:
|
# kolla_overcloud_inventory_top_level_group_map looks like:
|
||||||
# kolla_overcloud_inventory_top_level_group_map:
|
# kolla_overcloud_inventory_top_level_group_map:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure Logging configuration is applied
|
- name: Ensure Logging configuration is applied
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ logging_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
vars:
|
vars:
|
||||||
# NOTE(wszumski): Kayobe target env does not yet exist.
|
# NOTE(wszumski): Kayobe target env does not yet exist.
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure encryption configuration is applied
|
- name: Ensure encryption configuration is applied
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ luks_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- luks
|
- luks
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure LVM configuration is applied
|
- name: Ensure LVM configuration is applied
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ lvm_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- lvm
|
- lvm
|
||||||
- upgrade-check
|
- upgrade-check
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure software RAID configuration is applied
|
- name: Ensure software RAID configuration is applied
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ mdadm_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- mdadm
|
- mdadm
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Check network connectivity between hosts
|
- name: Check network connectivity between hosts
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ network_connectivity_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# Set this to an external IP address to check.
|
# Set this to an external IP address to check.
|
||||||
nc_external_ip: 8.8.8.8
|
nc_external_ip: 8.8.8.8
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure networking is configured
|
- name: Ensure networking is configured
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ network_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- network
|
- network
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
- name: Group overcloud nodes by their BMC type
|
- name: Group overcloud nodes by their BMC type
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_bios_raid_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- bios
|
- bios
|
||||||
- raid
|
- raid
|
||||||
@ -35,6 +39,10 @@
|
|||||||
- name: Check whether any changes to nodes' BIOS and RAID configuration are required
|
- name: Check whether any changes to nodes' BIOS and RAID configuration are required
|
||||||
hosts: overcloud_with_bmcs_of_type_idrac
|
hosts: overcloud_with_bmcs_of_type_idrac
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_bios_raid_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- bios
|
- bios
|
||||||
- raid
|
- raid
|
||||||
@ -57,6 +65,10 @@
|
|||||||
- name: Ensure that overcloud BIOS and RAID volumes are configured
|
- name: Ensure that overcloud BIOS and RAID volumes are configured
|
||||||
hosts: overcloud_with_bmcs_of_type_idrac
|
hosts: overcloud_with_bmcs_of_type_idrac
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_bios_raid_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- bios
|
- bios
|
||||||
- raid
|
- raid
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
- name: Ensure the overcloud nodes are deprovisioned
|
- name: Ensure the overcloud nodes are deprovisioned
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_deprovision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- deprovision
|
- deprovision
|
||||||
vars:
|
vars:
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
|
|
||||||
- name: Ensure overcloud hosts' /etc/hosts does not contain incorrect IPs
|
- name: Ensure overcloud hosts' /etc/hosts does not contain incorrect IPs
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_etc_hosts_fixup_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- etc-hosts-fixup
|
- etc-hosts-fixup
|
||||||
tasks:
|
tasks:
|
||||||
@ -25,6 +29,10 @@
|
|||||||
|
|
||||||
- name: Ensure rabbitmq containers' /etc/hosts does not contain incorrect IPs
|
- name: Ensure rabbitmq containers' /etc/hosts does not contain incorrect IPs
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_etc_hosts_fixup_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- etc-hosts-fixup
|
- etc-hosts-fixup
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Gather facts
|
- name: Gather facts
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_facts_gather_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Gather facts
|
- name: Gather facts
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
- name: Ensure the overcloud nodes' hardware is inspected
|
- name: Ensure the overcloud nodes' hardware is inspected
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_hardware_inspect_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- hardware-inspect
|
- hardware-inspect
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure the overcloud nodes' hardware introspection data is saved
|
- name: Ensure the overcloud nodes' hardware introspection data is saved
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_introspection_data_save_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
seed_host: "{{ groups['seed'][0] }}"
|
seed_host: "{{ groups['seed'][0] }}"
|
||||||
# Override this to save results to another location.
|
# Override this to save results to another location.
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
- name: Ensure the overcloud nodes are provisioned
|
- name: Ensure the overcloud nodes are provisioned
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_provision_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- provision
|
- provision
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Save overcloud service configuration
|
- name: Save overcloud service configuration
|
||||||
hosts: overcloud
|
hosts: overcloud
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ overcloud_service_config_save_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- service-config-save
|
- service-config-save
|
||||||
vars:
|
vars:
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
- name: Group hosts by their switch type and apply configuration filters
|
- name: Group hosts by their switch type and apply configuration filters
|
||||||
hosts: switches
|
hosts: switches
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
# Set this variable to True to configure the network for hardware
|
# Set this variable to True to configure the network for hardware
|
||||||
# discovery.
|
# discovery.
|
||||||
@ -90,6 +94,10 @@
|
|||||||
- name: Display switch configuration
|
- name: Display switch configuration
|
||||||
hosts: switches_in_display_mode_True
|
hosts: switches_in_display_mode_True
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tasks:
|
tasks:
|
||||||
- name: Display the candidate global switch configuration
|
- name: Display the candidate global switch configuration
|
||||||
debug:
|
debug:
|
||||||
@ -102,6 +110,10 @@
|
|||||||
- name: Ensure Arista physical switches are configured
|
- name: Ensure Arista physical switches are configured
|
||||||
hosts: switches_of_type_arista:&switches_in_display_mode_False
|
hosts: switches_of_type_arista:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
@ -114,6 +126,10 @@
|
|||||||
- name: Ensure DellOS physical switches are configured
|
- name: Ensure DellOS physical switches are configured
|
||||||
hosts: switches_of_type_dellos6:switches_of_type_dellos9:switches_of_type_dellos10:&switches_in_display_mode_False
|
hosts: switches_of_type_dellos6:switches_of_type_dellos9:switches_of_type_dellos10:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
@ -127,6 +143,10 @@
|
|||||||
- name: Ensure Dell PowerConnect physical switches are configured
|
- name: Ensure Dell PowerConnect physical switches are configured
|
||||||
hosts: switches_of_type_dell-powerconnect:&switches_in_display_mode_False
|
hosts: switches_of_type_dell-powerconnect:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
@ -139,6 +159,10 @@
|
|||||||
- name: Ensure Juniper physical switches are configured
|
- name: Ensure Juniper physical switches are configured
|
||||||
hosts: switches_of_type_junos:&switches_in_display_mode_False
|
hosts: switches_of_type_junos:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
@ -152,6 +176,10 @@
|
|||||||
- name: Ensure Mellanox physical switches are configured
|
- name: Ensure Mellanox physical switches are configured
|
||||||
hosts: switches_of_type_mellanox:&switches_in_display_mode_False
|
hosts: switches_of_type_mellanox:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
@ -164,6 +192,10 @@
|
|||||||
- name: Ensure Cumulus physical switches are configured with NCLU
|
- name: Ensure Cumulus physical switches are configured with NCLU
|
||||||
hosts: switches_of_type_nclu:&switches_in_display_mode_False
|
hosts: switches_of_type_nclu:&switches_in_display_mode_False
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ physical_network_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
roles:
|
roles:
|
||||||
- role: ssh-known-host
|
- role: ssh-known-host
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Configure local PyPi mirror
|
- name: Configure local PyPi mirror
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ pip_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- pip
|
- pip
|
||||||
vars:
|
vars:
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
- name: Configure HTTP(S) proxy settings
|
- name: Configure HTTP(S) proxy settings
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ proxy_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Configure SELinux state and reboot if required
|
- name: Configure SELinux state and reboot if required
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ selinux_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- selinux
|
- selinux
|
||||||
roles:
|
roles:
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
- name: Ensure known hosts are configured
|
- name: Ensure known hosts are configured
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ ssh_known_host_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- ssh-known-host
|
- ssh-known-host
|
||||||
roles:
|
roles:
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
- name: Configure swap
|
- name: Configure swap
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
become: true
|
become: true
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ swap_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- swap
|
- swap
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure Swift block devices are prepared
|
- name: Ensure Swift block devices are prepared
|
||||||
hosts: "{{ swift_hosts }}"
|
hosts: "{{ swift_hosts }}"
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ swift_block_devices_max_fail_percentage |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
vars:
|
vars:
|
||||||
swift_hosts: storage
|
swift_hosts: storage
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure sysctl parameters are configured
|
- name: Ensure sysctl parameters are configured
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ sysctl_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- sysctl
|
- sysctl
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure timezone is configured
|
- name: Ensure timezone is configured
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ time_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- timezone
|
- timezone
|
||||||
tasks:
|
tasks:
|
||||||
@ -24,6 +29,11 @@
|
|||||||
|
|
||||||
- name: Ensure Chrony is installed and configured
|
- name: Ensure Chrony is installed and configured
|
||||||
hosts: ntp
|
hosts: ntp
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ time_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- ntp
|
- ntp
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Configure tuned profile
|
- name: Configure tuned profile
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ tuned_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- tuned
|
- tuned
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure users exist
|
- name: Ensure users exist
|
||||||
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
hosts: seed:seed-hypervisor:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ users_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- users
|
- users
|
||||||
roles:
|
roles:
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
- name: Configure IOMMU
|
- name: Configure IOMMU
|
||||||
hosts: iommu
|
hosts: iommu
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ vgpu_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- iommu
|
- iommu
|
||||||
- vgpu
|
- vgpu
|
||||||
@ -15,6 +20,11 @@
|
|||||||
|
|
||||||
- name: Configure NVIDIA VGPUs
|
- name: Configure NVIDIA VGPUs
|
||||||
hosts: vgpu
|
hosts: vgpu
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ vgpu_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- vgpu
|
- vgpu
|
||||||
tasks:
|
tasks:
|
||||||
@ -28,6 +38,11 @@
|
|||||||
|
|
||||||
- name: Reboot when required
|
- name: Reboot when required
|
||||||
hosts: iommu:vgpu
|
hosts: iommu:vgpu
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ vgpu_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- reboot
|
- reboot
|
||||||
- iommu
|
- iommu
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
|
|
||||||
- name: Ensure that all unmounted block devices are wiped
|
- name: Ensure that all unmounted block devices are wiped
|
||||||
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
hosts: seed-hypervisor:seed:overcloud:infra-vms
|
||||||
|
max_fail_percentage: >-
|
||||||
|
{{ wipe_disks_max_fail_percentage |
|
||||||
|
default(host_configure_max_fail_percentage) |
|
||||||
|
default(kayobe_max_fail_percentage) |
|
||||||
|
default(100) }}
|
||||||
tags:
|
tags:
|
||||||
- wipe-disks
|
- wipe-disks
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -146,3 +146,30 @@ Similarly, for Kolla Ansible (notice the similar but different file names):
|
|||||||
:caption: ``$KAYOBE_CONFIG_PATH/kolla/globals.yml``
|
:caption: ``$KAYOBE_CONFIG_PATH/kolla/globals.yml``
|
||||||
|
|
||||||
kolla_ansible_setup_gather_subset: "all,!facter"
|
kolla_ansible_setup_gather_subset: "all,!facter"
|
||||||
|
|
||||||
|
Max failure percentage
|
||||||
|
======================
|
||||||
|
|
||||||
|
It is possible to specify a `maximum failure percentage
|
||||||
|
<https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_error_handling.html#setting-a-maximum-failure-percentage>`__
|
||||||
|
using ``kayobe_max_fail_percentage``. By default this is undefined, which is
|
||||||
|
equivalent to a value of 100, meaning that Ansible will continue execution
|
||||||
|
until all hosts have failed or completed. For example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:caption: ``$KAYOBE_CONFIG_PATH/globals.yml``
|
||||||
|
|
||||||
|
kayobe_max_fail_percentage: 50
|
||||||
|
|
||||||
|
A max fail percentage may be set for the ``kayobe * host configure`` commands
|
||||||
|
using ``host_configure_max_fail_percentage``, or for a specific playbook using
|
||||||
|
``<playbook>_max_fail_percentage`` where ``<playbook>`` is the playbook name
|
||||||
|
with dashes replaced with underscores and without the ``.yml`` extension. For
|
||||||
|
example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:caption: ``$KAYOBE_CONFIG_PATH/globals.yml``
|
||||||
|
|
||||||
|
kayobe_max_fail_percentage: 50
|
||||||
|
host_configure_max_fail_percentage: 25
|
||||||
|
time_max_fail_percentage: 100
|
||||||
|
@ -64,6 +64,10 @@
|
|||||||
# to not specify a gather subset.
|
# to not specify a gather subset.
|
||||||
#kayobe_ansible_setup_gather_subset:
|
#kayobe_ansible_setup_gather_subset:
|
||||||
|
|
||||||
|
# Global maximum failure percentage. By default this is undefined, which is
|
||||||
|
# equivalent to a value of 100.
|
||||||
|
#kayobe_max_fail_percentage:
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Dummy variable to allow Ansible to accept this file.
|
# Dummy variable to allow Ansible to accept this file.
|
||||||
workaround_ansible_issue_8743: yes
|
workaround_ansible_issue_8743: yes
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds support for setting the max fail percentage for Ansible plays via
|
||||||
|
``kayobe_max_fail_percentage``. It can also be set on a per-playbook basis,
|
||||||
|
e.g. ``time_max_fail_percentage``.
|
Loading…
Reference in New Issue
Block a user