Create derived parameters playbook, and role

The new `cli-derive-parameters.yaml` has been built to replace the mistral
workflow of the same name. This new playbook is leveraging several modules
which take advantage of the new ansible module utilities for tripleo-common.

The role `tripleo_derived_parameters` has been created, which will house all
of the required tasks to ensure an effective execution while also providing a
medium to test our process.

> Mock data has been added from a real deployment to ensure that the role
  data processing is correct and tested accordingly.

Change-Id: I6f3f797a37724d0eb91b37514087462ac25d175e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-04-13 08:35:32 -05:00 committed by John Fulton
parent e65b22d2c8
commit c16b0afab8
22 changed files with 5414 additions and 18 deletions

View File

@ -260,6 +260,9 @@ class AnsibleAutoPluginDirective(Directive):
test,
'molecule.yml'
)
if not os.path.exists(molecule_file):
continue
with open(molecule_file) as f:
molecule_conf = DOCYAML.load(f.read())

View File

@ -0,0 +1,6 @@
=================================
Role - tripleo_derived_parameters
=================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_derived_parameters

View File

@ -70,11 +70,13 @@ def main():
)
_, conn = openstack_cloud_from_module(module)
tripleo = tc.TripleOCommon(session=conn.session)
object_client = tripleo.get_object_client()
heat = tripleo.get_orchestration_client()
try:
result['stack_data'] = stack_param_utils.get_flattened_parameters(
tripleo.get_object_client(),
tripleo.get_orchestration_client(),
module.params["container"]
swift=object_client,
heat=heat,
container=module.params["container"]
)
except Exception as exp:
result['error'] = str(exp)

View File

@ -86,9 +86,13 @@ def main():
_, conn = openstack_cloud_from_module(module)
tripleo = tc.TripleOCommon(session=conn.session)
object_client = tripleo.get_object_client()
heat = None
if module.params['valid']:
heat = tripleo.get_orchestration_client()
try:
result['roles'] = roles_utils.get_roles_from_plan(
object_client,
swift=object_client,
heat=heat,
container=module.params['container'],
role_file_name=module.params['role_file_name'],
detail=module.params['detail'],

View File

@ -74,9 +74,10 @@ def main():
)
_, conn = openstack_cloud_from_module(module)
tripleo = tc.TripleOCommon(session=conn.session)
object_client = tripleo.get_object_client()
try:
stack_param_utils.reset_parameters(
swift=tripleo.get_object_client(),
swift=object_client,
container=module.params["container"],
key=module.params["parameter_key"]
)

View File

@ -34,17 +34,35 @@
- (tripleo_target_host is defined) | ternary('ssh', 'local') == 'local'
tasks:
# NOTE(cloudnull): At this time no formulas have been created. As new
# formulas are created tasks will be added here.
- name: Set result fact
set_facts:
derive_parameters_result:
hello: world
post_tasks:
- name: Update derive_parameters in plan
tripleo_plan_parameters_update:
- name: Get flatten params
tripleo_get_flatten_stack:
container: "{{ plan }}"
parameter_key: 'derived_parameters'
parameters: "{{ derive_parameters_result }}"
validate: true
register: tripleo_get_flatten_params
when:
- tripleo_get_flatten_params is undefined
- name: Get role list
tripleo_get_role_list:
container: "{{ plan }}"
valid: false
register: tripleo_role_list
when:
- tripleo_role_list is undefined
- name: Fail if stack_data has not been extracted
when:
- tripleo_get_flatten_params.stack_data is not defined
fail:
msg: "{{ plan }} is mising stack_data"
- name: Derive params for each role
include_role:
name: tripleo_derived_parameters
vars:
tripleo_plan_name: "{{ plan }}"
tripleo_role_name: "{{ outer_item }}"
tripleo_environment_parameters: "{{ tripleo_get_flatten_params.stack_data.environment_parameters }}"
tripleo_heat_resource_tree: "{{ tripleo_get_flatten_params.stack_data.heat_resource_tree }}"
loop: "{{ tripleo_role_list.roles }}"
loop_control:
loop_var: outer_item

View File

@ -0,0 +1,25 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "tripleo_tripleo_derived_parameters"
tripleo_tripleo_derived_parameters_debug: "{{ ((ansible_verbosity | int) >= 2) | bool }}"
tripleo_plan_name: Overcloud
tripleo_role_name: undefined
tripleo_environment_parameters: {}
tripleo_heat_resource_tree: {}

View File

@ -0,0 +1,15 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -0,0 +1,42 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
galaxy_info:
author: OpenStack
description: TripleO OpenStack Role -- tripleo_derived_parameters
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.7
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 7
- 8
galaxy_tags:
- tripleo
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies: []

View File

@ -0,0 +1,37 @@
# Molecule managed
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi
{% for pkg in item.easy_install | default([]) %}
# install pip for centos where there is no python-pip rpm in default repos
RUN easy_install {{ pkg }}
{% endfor %}
CMD ["sh", "-c", "while true; do sleep 10000; done"]

View File

@ -0,0 +1,40 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Converge
hosts: all
vars:
tripleo_get_flatten_params: "{{ lookup('file', '../mock_params') | from_yaml }}"
tripleo_role_list: "{{ lookup('file', '../mock_roles') | from_yaml }}"
tripleo_all_nodes: "{{ lookup('file', '../mock_ironic_all') | from_yaml }}"
hci_profile_config: "{{ lookup('file', '../mock_hci_profile_config') | from_yaml }}"
hci_profile: default
num_phy_cores_per_numa_node_for_pmd: 1
hw_data_required: true
tasks:
- name: Derive params for each role
include_role:
name: tripleo_derived_parameters
vars:
tripleo_plan_name: "overcloud"
tripleo_role_name: "{{ outer_item }}"
tripleo_environment_parameters: "{{ tripleo_get_flatten_params.stack_data.environment_parameters }}"
tripleo_heat_resource_tree: "{{ tripleo_get_flatten_params.stack_data.heat_resource_tree }}"
baremetal_data: "{{ lookup('file', '../mock_baremetal_{{ outer_item }}') | from_yaml }}"
loop: "{{ tripleo_role_list.roles }}"
loop_control:
loop_var: outer_item

View File

@ -0,0 +1,43 @@
---
driver:
name: podman
log: true
platforms:
- name: centos8
hostname: centos8
image: centos:8
dockerfile: Dockerfile
pkg_extras: python*-setuptools
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimts: &ulimit
- host
provisioner:
name: ansible
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH:-/usr/share/ansible/roles}:${HOME}/zuul-jobs/roles"
ANSIBLE_MODULE_UTILS: "${ANSIBLE_MODULE_UTILS:-/tripleo_ansible/ansible_plugins/module_utils}"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
ANSIBLE_ACTION_PLUGINS: "${ANSIBLE_ACTION_PLUGINS:-/usr/share/ansible/plugins/action}"
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy
verifier:
name: testinfra

View File

@ -0,0 +1,21 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Prepare
hosts: all
roles:
- role: test_deps

View File

@ -0,0 +1,15 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -0,0 +1,574 @@
---
success: true
changed: false
error: null
data:
inventory:
interfaces:
-
name: "ens3"
mac_address: "24:42:00:68:d0:30"
ipv4_address: "192.168.24.100"
ipv6_address: "fe80::c67a:d622:19ef:abbb%ens3"
has_carrier: true
lldp: []
vendor: "0x1af4"
product: "0x0001"
client_id: null
biosdevname: null
-
name: "ens4"
mac_address: "24:42:00:61:03:eb"
ipv4_address: "192.168.24.101"
ipv6_address: "fe80::2065:a697:4f38:715%ens4"
has_carrier: true
lldp: []
vendor: "0x1af4"
product: "0x0001"
client_id: null
biosdevname: null
cpu:
model_name: "AMD Ryzen 7 1800X Eight-Core Processor"
frequency: "3599.998"
count: 2
architecture: "x86_64"
flags:
- "fpu"
- "vme"
- "de"
- "pse"
- "tsc"
- "msr"
- "pae"
- "mce"
- "cx8"
- "apic"
- "sep"
- "mtrr"
- "pge"
- "mca"
- "cmov"
- "pat"
- "pse36"
- "clflush"
- "mmx"
- "fxsr"
- "sse"
- "sse2"
- "syscall"
- "nx"
- "mmxext"
- "fxsr_opt"
- "pdpe1gb"
- "rdtscp"
- "lm"
- "rep_good"
- "nopl"
- "cpuid"
- "extd_apicid"
- "tsc_known_freq"
- "pni"
- "pclmulqdq"
- "ssse3"
- "fma"
- "cx16"
- "sse4_1"
- "sse4_2"
- "x2apic"
- "movbe"
- "popcnt"
- "tsc_deadline_timer"
- "aes"
- "xsave"
- "avx"
- "f16c"
- "rdrand"
- "hypervisor"
- "lahf_lm"
- "cmp_legacy"
- "svm"
- "cr8_legacy"
- "abm"
- "sse4a"
- "misalignsse"
- "3dnowprefetch"
- "osvw"
- "perfctr_core"
- "cpb"
- "ssbd"
- "vmmcall"
- "fsgsbase"
- "tsc_adjust"
- "bmi1"
- "avx2"
- "smep"
- "bmi2"
- "rdseed"
- "adx"
- "smap"
- "clflushopt"
- "sha_ni"
- "xsaveopt"
- "xsavec"
- "xgetbv1"
- "virt_ssbd"
- "arat"
- "npt"
- "nrip_save"
- "arch_capabilities"
disks:
-
name: "/dev/sda"
model: "QEMU HARDDISK"
size: 53687091200
rotational: true
wwn: null
serial: "drive-scsi0-0-0-5"
vendor: "QEMU"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "1:0:0:5"
by_path: "/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:0:5"
-
name: "/dev/sdb"
model: "QEMU HARDDISK"
size: 53687091200
rotational: true
wwn: null
serial: "drive-scsi0-0-0-4"
vendor: "QEMU"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "1:0:0:4"
by_path: "/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:0:4"
-
name: "/dev/sdc"
model: "QEMU HARDDISK"
size: 53687091200
rotational: true
wwn: null
serial: "drive-scsi0-0-0-3"
vendor: "QEMU"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "1:0:0:3"
by_path: "/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:0:3"
-
name: "/dev/sdd"
model: "QEMU HARDDISK"
size: 53687091200
rotational: true
wwn: null
serial: "drive-scsi0-0-0-2"
vendor: "QEMU"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "1:0:0:2"
by_path: "/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:0:2"
-
name: "/dev/sde"
model: "QEMU HARDDISK"
size: 107374182400
rotational: true
wwn: null
serial: "QM00001"
vendor: "ATA"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "0:0:0:0"
by_path: "/dev/disk/by-path/pci-0000:00:01.1-ata-1"
memory:
total: 5951889408
physical_mb: 5860
bmc_address: "0.0.0.0"
bmc_v6address: "::/0"
system_vendor:
product_name: "KVM"
serial_number: ""
manufacturer: "Red Hat"
boot:
current_boot_mode: "bios"
pxe_interface: "24:42:00:68:d0:30"
hostname: "localhost.localdomain"
root_disk:
name: "/dev/sde"
model: "QEMU HARDDISK"
size: 107374182400
rotational: true
wwn: null
serial: "QM00001"
vendor: "ATA"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "0:0:0:0"
by_path: "/dev/disk/by-path/pci-0000:00:01.1-ata-1"
boot_interface: "24:42:00:68:d0:30"
configuration:
collectors:
- "default"
- "extra-hardware"
- "numa-topology"
- "logs"
managers:
-
name: "generic_hardware_manager"
version: "1.1"
numa_topology:
ram:
-
numa_node: 0
size_kb: 5812392
cpus:
-
thread_siblings:
- 1
- 0
cpu: 0
numa_node: 0
nics: []
error: null
ipmi_address: null
ipmi_v6address: null
all_interfaces:
ens3:
ip: "192.168.24.100"
mac: "24:42:00:68:d0:30"
client_id: null
pxe: true
ens4:
ip: "192.168.24.101"
mac: "24:42:00:61:03:eb"
client_id: null
pxe: false
interfaces:
ens3:
ip: "192.168.24.100"
mac: "24:42:00:68:d0:30"
client_id: null
pxe: true
macs:
- "24:42:00:68:d0:30"
local_gb: 99
cpus: 2
cpu_arch: "x86_64"
memory_mb: 5860
extra:
disk:
logical:
count: 5
sdd:
size: 53
vendor: "QEMU"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 256
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
scsi-id: "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-2"
SMART/vendor: "QEMU"
SMART/product: "QEMU HARDDISK"
sdb:
size: 53
vendor: "QEMU"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 256
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
scsi-id: "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-4"
SMART/vendor: "QEMU"
SMART/product: "QEMU HARDDISK"
sde:
size: 107
vendor: "ATA"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 2
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
id: "ata-QEMU_HARDDISK_QM00001"
SMART/device_model: "QEMU HARDDISK"
SMART/serial_number: "QM00001"
SMART/firmware_version: "2.5+"
SMART/Raw_Read_Error_Rate(1)/value: 100
SMART/Raw_Read_Error_Rate(1)/worst: 100
SMART/Raw_Read_Error_Rate(1)/thresh: 6
SMART/Raw_Read_Error_Rate(1)/when_failed: "NEVER"
SMART/Raw_Read_Error_Rate(1)/raw: 0
SMART/Spin_Up_Time(3)/value: 100
SMART/Spin_Up_Time(3)/worst: 100
SMART/Spin_Up_Time(3)/thresh: 0
SMART/Spin_Up_Time(3)/when_failed: "NEVER"
SMART/Spin_Up_Time(3)/raw: 16
SMART/Start_Stop_Count(4)/value: 100
SMART/Start_Stop_Count(4)/worst: 100
SMART/Start_Stop_Count(4)/thresh: 20
SMART/Start_Stop_Count(4)/when_failed: "NEVER"
SMART/Start_Stop_Count(4)/raw: 100
SMART/Reallocated_Sector_Ct(5)/value: 100
SMART/Reallocated_Sector_Ct(5)/worst: 100
SMART/Reallocated_Sector_Ct(5)/thresh: 36
SMART/Reallocated_Sector_Ct(5)/when_failed: "NEVER"
SMART/Reallocated_Sector_Ct(5)/raw: 0
SMART/Power_On_Hours(9)/value: 100
SMART/Power_On_Hours(9)/worst: 100
SMART/Power_On_Hours(9)/thresh: 0
SMART/Power_On_Hours(9)/when_failed: "NEVER"
SMART/Power_On_Hours(9)/raw: 1
SMART/Power_Cycle_Count(12)/value: 100
SMART/Power_Cycle_Count(12)/worst: 100
SMART/Power_Cycle_Count(12)/thresh: 0
SMART/Power_Cycle_Count(12)/when_failed: "NEVER"
SMART/Power_Cycle_Count(12)/raw: 0
SMART/Airflow_Temperature_Cel(190)/value: 69
SMART/Airflow_Temperature_Cel(190)/worst: 69
SMART/Airflow_Temperature_Cel(190)/thresh: 50
SMART/Airflow_Temperature_Cel(190)/when_failed: "NEVER"
SMART/Airflow_Temperature_Cel(190)/raw: " 31 (Min/Max 31/31)"
sdc:
size: 53
vendor: "QEMU"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 256
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
scsi-id: "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-3"
SMART/vendor: "QEMU"
SMART/product: "QEMU HARDDISK"
sda:
size: 53
vendor: "QEMU"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 256
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
scsi-id: "scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-5"
SMART/vendor: "QEMU"
SMART/product: "QEMU HARDDISK"
system:
product:
name: "KVM"
vendor: "Red Hat"
version: "RHEL 7.6.0 PC (i440FX + PIIX, 1996)"
uuid: "d1eaed04-8530-4592-89af-b82487eda835"
kernel:
version: "4.18.0-147.8.1.el8_1.x86_64"
arch: "x86_64"
cmdline: "ipa-inspection-callback-url=http://192.168.24.1:5050/v1/continue ipa-inspection-collectors=default,extra-hardware,numa-topology,logs systemd.journald.forward_to_console=yes BOOTIF=24:42:00:68:d0:30 ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 initrd=agent.ramdisk"
rtc:
utc: "no"
firmware:
bios:
version: "1.11.0-2.el7"
date: "04/01/2014"
vendor: "SeaBIOS"
memory:
total:
size: 6144655360
network:
ens3:
businfo: "virtio@0"
ipv4: "192.168.24.100"
ipv4-netmask: "255.255.255.0"
ipv4-cidr: 24
ipv4-network: "192.168.24.0"
link: "yes"
driver: "virtio_net"
autonegotiation: "off"
serial: "24:42:00:68:d0:30"
rx-checksumming: "on [fixed]"
tx-checksumming: "on"
tx-checksumming/tx-checksum-ipv4: "off [fixed]"
tx-checksumming/tx-checksum-ip-generic: "on"
tx-checksumming/tx-checksum-ipv6: "off [fixed]"
tx-checksumming/tx-checksum-fcoe-crc: "off [fixed]"
tx-checksumming/tx-checksum-sctp: "off [fixed]"
scatter-gather: "on"
scatter-gather/tx-scatter-gather: "on"
scatter-gather/tx-scatter-gather-fraglist: "off [fixed]"
tcp-segmentation-offload: "on"
tcp-segmentation-offload/tx-tcp-segmentation: "on"
tcp-segmentation-offload/tx-tcp-ecn-segmentation: "on"
tcp-segmentation-offload/tx-tcp-mangleid-segmentation: "off"
tcp-segmentation-offload/tx-tcp6-segmentation: "on"
generic-segmentation-offload: "on"
generic-receive-offload: "on"
large-receive-offload: "off [fixed]"
rx-vlan-offload: "off [fixed]"
tx-vlan-offload: "off [fixed]"
ntuple-filters: "off [fixed]"
receive-hashing: "off [fixed]"
highdma: "on [fixed]"
rx-vlan-filter: "on [fixed]"
vlan-challenged: "off [fixed]"
tx-lockless: "off [fixed]"
netns-local: "off [fixed]"
tx-gso-robust: "on [fixed]"
tx-fcoe-segmentation: "off [fixed]"
tx-gre-segmentation: "off [fixed]"
tx-gre-csum-segmentation: "off [fixed]"
tx-ipxip4-segmentation: "off [fixed]"
tx-ipxip6-segmentation: "off [fixed]"
tx-udp_tnl-segmentation: "off [fixed]"
tx-udp_tnl-csum-segmentation: "off [fixed]"
tx-gso-partial: "off [fixed]"
tx-sctp-segmentation: "off [fixed]"
tx-esp-segmentation: "off [fixed]"
tx-udp-segmentation: "off [fixed]"
tls-hw-rx-offload: "off [fixed]"
fcoe-mtu: "off [fixed]"
tx-nocache-copy: "off"
loopback: "off [fixed]"
rx-fcs: "off [fixed]"
rx-all: "off [fixed]"
tx-vlan-stag-hw-insert: "off [fixed]"
rx-vlan-stag-hw-parse: "off [fixed]"
rx-vlan-stag-filter: "off [fixed]"
l2-fwd-offload: "off [fixed]"
hw-tc-offload: "off [fixed]"
esp-hw-offload: "off [fixed]"
esp-tx-csum-hw-offload: "off [fixed]"
rx-udp_tunnel-port-offload: "off [fixed]"
tls-hw-tx-offload: "off [fixed]"
rx-gro-hw: "off [fixed]"
tls-hw-record: "off [fixed]"
ens4:
businfo: "virtio@1"
ipv4: "192.168.24.101"
ipv4-netmask: "255.255.255.0"
ipv4-cidr: 24
ipv4-network: "192.168.24.0"
link: "yes"
driver: "virtio_net"
autonegotiation: "off"
serial: "24:42:00:61:03:eb"
rx-checksumming: "on [fixed]"
tx-checksumming: "on"
tx-checksumming/tx-checksum-ipv4: "off [fixed]"
tx-checksumming/tx-checksum-ip-generic: "on"
tx-checksumming/tx-checksum-ipv6: "off [fixed]"
tx-checksumming/tx-checksum-fcoe-crc: "off [fixed]"
tx-checksumming/tx-checksum-sctp: "off [fixed]"
scatter-gather: "on"
scatter-gather/tx-scatter-gather: "on"
scatter-gather/tx-scatter-gather-fraglist: "off [fixed]"
tcp-segmentation-offload: "on"
tcp-segmentation-offload/tx-tcp-segmentation: "on"
tcp-segmentation-offload/tx-tcp-ecn-segmentation: "on"
tcp-segmentation-offload/tx-tcp-mangleid-segmentation: "off"
tcp-segmentation-offload/tx-tcp6-segmentation: "on"
generic-segmentation-offload: "on"
generic-receive-offload: "on"
large-receive-offload: "off [fixed]"
rx-vlan-offload: "off [fixed]"
tx-vlan-offload: "off [fixed]"
ntuple-filters: "off [fixed]"
receive-hashing: "off [fixed]"
highdma: "on [fixed]"
rx-vlan-filter: "on [fixed]"
vlan-challenged: "off [fixed]"
tx-lockless: "off [fixed]"
netns-local: "off [fixed]"
tx-gso-robust: "on [fixed]"
tx-fcoe-segmentation: "off [fixed]"
tx-gre-segmentation: "off [fixed]"
tx-gre-csum-segmentation: "off [fixed]"
tx-ipxip4-segmentation: "off [fixed]"
tx-ipxip6-segmentation: "off [fixed]"
tx-udp_tnl-segmentation: "off [fixed]"
tx-udp_tnl-csum-segmentation: "off [fixed]"
tx-gso-partial: "off [fixed]"
tx-sctp-segmentation: "off [fixed]"
tx-esp-segmentation: "off [fixed]"
tx-udp-segmentation: "off [fixed]"
tls-hw-rx-offload: "off [fixed]"
fcoe-mtu: "off [fixed]"
tx-nocache-copy: "off"
loopback: "off [fixed]"
rx-fcs: "off [fixed]"
rx-all: "off [fixed]"
tx-vlan-stag-hw-insert: "off [fixed]"
rx-vlan-stag-hw-parse: "off [fixed]"
rx-vlan-stag-filter: "off [fixed]"
l2-fwd-offload: "off [fixed]"
hw-tc-offload: "off [fixed]"
esp-hw-offload: "off [fixed]"
esp-tx-csum-hw-offload: "off [fixed]"
rx-udp_tunnel-port-offload: "off [fixed]"
tls-hw-tx-offload: "off [fixed]"
rx-gro-hw: "off [fixed]"
tls-hw-record: "off [fixed]"
cpu:
physical:
number: 2
smt: "notsupported"
physical_0:
vendor: "AuthenticAMD"
product: "AMD Ryzen 7 1800X Eight-Core Processor"
cores: 1
threads: 1
family: 23
model: 1
stepping: 1
architecture: "x86_64"
l1d cache: "64K"
l1i cache: "64K"
l2 cache: "512K"
l3 cache: "16384K"
current_Mhz: 3599
flags: "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core cpb ssbd vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat npt nrip_save arch_capabilities"
threads_per_core: 1
physical_1:
vendor: "AuthenticAMD"
product: "AMD Ryzen 7 1800X Eight-Core Processor"
cores: 1
threads: 1
family: 23
model: 1
stepping: 1
architecture: "x86_64"
l1d cache: "64K"
l1i cache: "64K"
l2 cache: "512K"
l3 cache: "16384K"
current_Mhz: 3599
flags: "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core cpb ssbd vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat npt nrip_save arch_capabilities"
threads_per_core: 1
logical:
number: 2
numa:
nodes:
count: 1
node_0:
cpu_count: 2
cpu_mask: 3
hw:
auxv:
hwcap: "78bfbff"
pagesz: 4096
flags: "0x0"
hwcap2: "0x0"
platform: "x86_64"
failed: false

View File

@ -0,0 +1,466 @@
---
success: true
changed: false
error: null
data:
inventory:
interfaces:
-
name: "ens3"
mac_address: "24:42:00:9a:63:09"
ipv4_address: "192.168.24.100"
ipv6_address: "fe80::b60d:bb3a:8f88:1ef5%ens3"
has_carrier: true
lldp: []
vendor: "0x1af4"
product: "0x0001"
client_id: null
biosdevname: null
-
name: "ens4"
mac_address: "24:42:00:5c:86:35"
ipv4_address: "192.168.24.101"
ipv6_address: "fe80::bf16:96cc:eac2:a36a%ens4"
has_carrier: true
lldp: []
vendor: "0x1af4"
product: "0x0001"
client_id: null
biosdevname: null
cpu:
model_name: "AMD Ryzen 7 1800X Eight-Core Processor"
frequency: "3599.998"
count: 2
architecture: "x86_64"
flags:
- "fpu"
- "vme"
- "de"
- "pse"
- "tsc"
- "msr"
- "pae"
- "mce"
- "cx8"
- "apic"
- "sep"
- "mtrr"
- "pge"
- "mca"
- "cmov"
- "pat"
- "pse36"
- "clflush"
- "mmx"
- "fxsr"
- "sse"
- "sse2"
- "syscall"
- "nx"
- "mmxext"
- "fxsr_opt"
- "pdpe1gb"
- "rdtscp"
- "lm"
- "rep_good"
- "nopl"
- "cpuid"
- "extd_apicid"
- "tsc_known_freq"
- "pni"
- "pclmulqdq"
- "ssse3"
- "fma"
- "cx16"
- "sse4_1"
- "sse4_2"
- "x2apic"
- "movbe"
- "popcnt"
- "tsc_deadline_timer"
- "aes"
- "xsave"
- "avx"
- "f16c"
- "rdrand"
- "hypervisor"
- "lahf_lm"
- "cmp_legacy"
- "svm"
- "cr8_legacy"
- "abm"
- "sse4a"
- "misalignsse"
- "3dnowprefetch"
- "osvw"
- "perfctr_core"
- "cpb"
- "ssbd"
- "vmmcall"
- "fsgsbase"
- "tsc_adjust"
- "bmi1"
- "avx2"
- "smep"
- "bmi2"
- "rdseed"
- "adx"
- "smap"
- "clflushopt"
- "sha_ni"
- "xsaveopt"
- "xsavec"
- "xgetbv1"
- "virt_ssbd"
- "arat"
- "npt"
- "nrip_save"
- "arch_capabilities"
disks:
-
name: "/dev/sda"
model: "QEMU HARDDISK"
size: 107374182400
rotational: true
wwn: null
serial: "QM00001"
vendor: "ATA"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "0:0:0:0"
by_path: "/dev/disk/by-path/pci-0000:00:01.1-ata-1"
memory:
total: 3935551488
physical_mb: 3907
bmc_address: "0.0.0.0"
bmc_v6address: "::/0"
system_vendor:
product_name: "KVM"
serial_number: ""
manufacturer: "Red Hat"
boot:
current_boot_mode: "bios"
pxe_interface: "24:42:00:9a:63:09"
hostname: "localhost.localdomain"
root_disk:
name: "/dev/sda"
model: "QEMU HARDDISK"
size: 107374182400
rotational: true
wwn: null
serial: "QM00001"
vendor: "ATA"
wwn_with_extension: null
wwn_vendor_extension: null
hctl: "0:0:0:0"
by_path: "/dev/disk/by-path/pci-0000:00:01.1-ata-1"
boot_interface: "24:42:00:9a:63:09"
configuration:
collectors:
- "default"
- "extra-hardware"
- "numa-topology"
- "logs"
managers:
-
name: "generic_hardware_manager"
version: "1.1"
numa_topology:
ram:
-
numa_node: 0
size_kb: 3843312
cpus:
-
thread_siblings:
- 1
- 0
cpu: 0
numa_node: 0
nics: []
error: null
ipmi_address: null
ipmi_v6address: null
all_interfaces:
ens3:
ip: "192.168.24.100"
mac: "24:42:00:9a:63:09"
client_id: null
pxe: true
ens4:
ip: "192.168.24.101"
mac: "24:42:00:5c:86:35"
client_id: null
pxe: false
interfaces:
ens3:
ip: "192.168.24.100"
mac: "24:42:00:9a:63:09"
client_id: null
pxe: true
macs:
- "24:42:00:9a:63:09"
local_gb: 99
cpus: 2
cpu_arch: "x86_64"
memory_mb: 3907
extra:
disk:
logical:
count: 1
sda:
size: 107
vendor: "ATA"
model: "QEMU HARDDISK"
rev: "2.5+"
optimal_io_size: 0
physical_block_size: 512
rotational: 1
nr_requests: 2
scheduler: "mq-deadline"
Write Cache Enable: 1
Read Cache Disable: 0
id: "ata-QEMU_HARDDISK_QM00001"
SMART/device_model: "QEMU HARDDISK"
SMART/serial_number: "QM00001"
SMART/firmware_version: "2.5+"
SMART/Raw_Read_Error_Rate(1)/value: 100
SMART/Raw_Read_Error_Rate(1)/worst: 100
SMART/Raw_Read_Error_Rate(1)/thresh: 6
SMART/Raw_Read_Error_Rate(1)/when_failed: "NEVER"
SMART/Raw_Read_Error_Rate(1)/raw: 0
SMART/Spin_Up_Time(3)/value: 100
SMART/Spin_Up_Time(3)/worst: 100
SMART/Spin_Up_Time(3)/thresh: 0
SMART/Spin_Up_Time(3)/when_failed: "NEVER"
SMART/Spin_Up_Time(3)/raw: 16
SMART/Start_Stop_Count(4)/value: 100
SMART/Start_Stop_Count(4)/worst: 100
SMART/Start_Stop_Count(4)/thresh: 20
SMART/Start_Stop_Count(4)/when_failed: "NEVER"
SMART/Start_Stop_Count(4)/raw: 100
SMART/Reallocated_Sector_Ct(5)/value: 100
SMART/Reallocated_Sector_Ct(5)/worst: 100
SMART/Reallocated_Sector_Ct(5)/thresh: 36
SMART/Reallocated_Sector_Ct(5)/when_failed: "NEVER"
SMART/Reallocated_Sector_Ct(5)/raw: 0
SMART/Power_On_Hours(9)/value: 100
SMART/Power_On_Hours(9)/worst: 100
SMART/Power_On_Hours(9)/thresh: 0
SMART/Power_On_Hours(9)/when_failed: "NEVER"
SMART/Power_On_Hours(9)/raw: 1
SMART/Power_Cycle_Count(12)/value: 100
SMART/Power_Cycle_Count(12)/worst: 100
SMART/Power_Cycle_Count(12)/thresh: 0
SMART/Power_Cycle_Count(12)/when_failed: "NEVER"
SMART/Power_Cycle_Count(12)/raw: 0
SMART/Airflow_Temperature_Cel(190)/value: 69
SMART/Airflow_Temperature_Cel(190)/worst: 69
SMART/Airflow_Temperature_Cel(190)/thresh: 50
SMART/Airflow_Temperature_Cel(190)/when_failed: "NEVER"
SMART/Airflow_Temperature_Cel(190)/raw: " 31 (Min/Max 31/31)"
system:
product:
name: "KVM"
vendor: "Red Hat"
version: "RHEL 7.6.0 PC (i440FX + PIIX, 1996)"
uuid: "9da21fb0-062b-4264-96a3-4b5896181898"
kernel:
version: "4.18.0-147.8.1.el8_1.x86_64"
arch: "x86_64"
cmdline: "ipa-inspection-callback-url=http://192.168.24.1:5050/v1/continue ipa-inspection-collectors=default,extra-hardware,numa-topology,logs systemd.journald.forward_to_console=yes BOOTIF=24:42:00:9a:63:09 ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 initrd=agent.ramdisk"
rtc:
utc: "no"
firmware:
bios:
version: "1.11.0-2.el7"
date: "04/01/2014"
vendor: "SeaBIOS"
memory:
total:
size: 4096786432
network:
ens3:
businfo: "virtio@0"
ipv4: "192.168.24.100"
ipv4-netmask: "255.255.255.0"
ipv4-cidr: 24
ipv4-network: "192.168.24.0"
link: "yes"
driver: "virtio_net"
autonegotiation: "off"
serial: "24:42:00:9a:63:09"
rx-checksumming: "on [fixed]"
tx-checksumming: "on"
tx-checksumming/tx-checksum-ipv4: "off [fixed]"
tx-checksumming/tx-checksum-ip-generic: "on"
tx-checksumming/tx-checksum-ipv6: "off [fixed]"
tx-checksumming/tx-checksum-fcoe-crc: "off [fixed]"
tx-checksumming/tx-checksum-sctp: "off [fixed]"
scatter-gather: "on"
scatter-gather/tx-scatter-gather: "on"
scatter-gather/tx-scatter-gather-fraglist: "off [fixed]"
tcp-segmentation-offload: "on"
tcp-segmentation-offload/tx-tcp-segmentation: "on"
tcp-segmentation-offload/tx-tcp-ecn-segmentation: "on"
tcp-segmentation-offload/tx-tcp-mangleid-segmentation: "off"
tcp-segmentation-offload/tx-tcp6-segmentation: "on"
generic-segmentation-offload: "on"
generic-receive-offload: "on"
large-receive-offload: "off [fixed]"
rx-vlan-offload: "off [fixed]"
tx-vlan-offload: "off [fixed]"
ntuple-filters: "off [fixed]"
receive-hashing: "off [fixed]"
highdma: "on [fixed]"
rx-vlan-filter: "on [fixed]"
vlan-challenged: "off [fixed]"
tx-lockless: "off [fixed]"
netns-local: "off [fixed]"
tx-gso-robust: "on [fixed]"
tx-fcoe-segmentation: "off [fixed]"
tx-gre-segmentation: "off [fixed]"
tx-gre-csum-segmentation: "off [fixed]"
tx-ipxip4-segmentation: "off [fixed]"
tx-ipxip6-segmentation: "off [fixed]"
tx-udp_tnl-segmentation: "off [fixed]"
tx-udp_tnl-csum-segmentation: "off [fixed]"
tx-gso-partial: "off [fixed]"
tx-sctp-segmentation: "off [fixed]"
tx-esp-segmentation: "off [fixed]"
tx-udp-segmentation: "off [fixed]"
tls-hw-rx-offload: "off [fixed]"
fcoe-mtu: "off [fixed]"
tx-nocache-copy: "off"
loopback: "off [fixed]"
rx-fcs: "off [fixed]"
rx-all: "off [fixed]"
tx-vlan-stag-hw-insert: "off [fixed]"
rx-vlan-stag-hw-parse: "off [fixed]"
rx-vlan-stag-filter: "off [fixed]"
l2-fwd-offload: "off [fixed]"
hw-tc-offload: "off [fixed]"
esp-hw-offload: "off [fixed]"
esp-tx-csum-hw-offload: "off [fixed]"
rx-udp_tunnel-port-offload: "off [fixed]"
tls-hw-tx-offload: "off [fixed]"
rx-gro-hw: "off [fixed]"
tls-hw-record: "off [fixed]"
ens4:
businfo: "virtio@1"
ipv4: "192.168.24.101"
ipv4-netmask: "255.255.255.0"
ipv4-cidr: 24
ipv4-network: "192.168.24.0"
link: "yes"
driver: "virtio_net"
autonegotiation: "off"
serial: "24:42:00:5c:86:35"
rx-checksumming: "on [fixed]"
tx-checksumming: "on"
tx-checksumming/tx-checksum-ipv4: "off [fixed]"
tx-checksumming/tx-checksum-ip-generic: "on"
tx-checksumming/tx-checksum-ipv6: "off [fixed]"
tx-checksumming/tx-checksum-fcoe-crc: "off [fixed]"
tx-checksumming/tx-checksum-sctp: "off [fixed]"
scatter-gather: "on"
scatter-gather/tx-scatter-gather: "on"
scatter-gather/tx-scatter-gather-fraglist: "off [fixed]"
tcp-segmentation-offload: "on"
tcp-segmentation-offload/tx-tcp-segmentation: "on"
tcp-segmentation-offload/tx-tcp-ecn-segmentation: "on"
tcp-segmentation-offload/tx-tcp-mangleid-segmentation: "off"
tcp-segmentation-offload/tx-tcp6-segmentation: "on"
generic-segmentation-offload: "on"
generic-receive-offload: "on"
large-receive-offload: "off [fixed]"
rx-vlan-offload: "off [fixed]"
tx-vlan-offload: "off [fixed]"
ntuple-filters: "off [fixed]"
receive-hashing: "off [fixed]"
highdma: "on [fixed]"
rx-vlan-filter: "on [fixed]"
vlan-challenged: "off [fixed]"
tx-lockless: "off [fixed]"
netns-local: "off [fixed]"
tx-gso-robust: "on [fixed]"
tx-fcoe-segmentation: "off [fixed]"
tx-gre-segmentation: "off [fixed]"
tx-gre-csum-segmentation: "off [fixed]"
tx-ipxip4-segmentation: "off [fixed]"
tx-ipxip6-segmentation: "off [fixed]"
tx-udp_tnl-segmentation: "off [fixed]"
tx-udp_tnl-csum-segmentation: "off [fixed]"
tx-gso-partial: "off [fixed]"
tx-sctp-segmentation: "off [fixed]"
tx-esp-segmentation: "off [fixed]"
tx-udp-segmentation: "off [fixed]"
tls-hw-rx-offload: "off [fixed]"
fcoe-mtu: "off [fixed]"
tx-nocache-copy: "off"
loopback: "off [fixed]"
rx-fcs: "off [fixed]"
rx-all: "off [fixed]"
tx-vlan-stag-hw-insert: "off [fixed]"
rx-vlan-stag-hw-parse: "off [fixed]"
rx-vlan-stag-filter: "off [fixed]"
l2-fwd-offload: "off [fixed]"
hw-tc-offload: "off [fixed]"
esp-hw-offload: "off [fixed]"
esp-tx-csum-hw-offload: "off [fixed]"
rx-udp_tunnel-port-offload: "off [fixed]"
tls-hw-tx-offload: "off [fixed]"
rx-gro-hw: "off [fixed]"
tls-hw-record: "off [fixed]"
cpu:
physical:
number: 2
smt: "notsupported"
physical_0:
vendor: "AuthenticAMD"
product: "AMD Ryzen 7 1800X Eight-Core Processor"
cores: 1
threads: 1
family: 23
model: 1
stepping: 1
architecture: "x86_64"
l1d cache: "64K"
l1i cache: "64K"
l2 cache: "512K"
l3 cache: "16384K"
current_Mhz: 3599
flags: "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core cpb ssbd vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat npt nrip_save arch_capabilities"
threads_per_core: 1
physical_1:
vendor: "AuthenticAMD"
product: "AMD Ryzen 7 1800X Eight-Core Processor"
cores: 1
threads: 1
family: 23
model: 1
stepping: 1
architecture: "x86_64"
l1d cache: "64K"
l1i cache: "64K"
l2 cache: "512K"
l3 cache: "16384K"
current_Mhz: 3599
flags: "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core cpb ssbd vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 virt_ssbd arat npt nrip_save arch_capabilities"
threads_per_core: 1
logical:
number: 2
numa:
nodes:
count: 1
node_0:
cpu_count: 2
cpu_mask: 3
hw:
auxv:
hwcap: "78bfbff"
pagesz: 4096
flags: "0x0"
hwcap2: "0x0"
platform: "x86_64"
failed: false

View File

@ -0,0 +1,12 @@
default:
average_guest_memory_size_in_mb: 2048
average_guest_cpu_utilization_percentage: 50
many_small_vms:
average_guest_memory_size_in_mb: 1024
average_guest_cpu_utilization_percentage: 20
few_large_vms:
average_guest_memory_size_in_mb: 4096
average_guest_cpu_utilization_percentage: 80
nfv_default:
average_guest_memory_size_in_mb: 8192
average_guest_cpu_utilization_percentage: 90

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
changed: false
error: null
failed: false
roles:
- Controller
- ComputeHCI
success: true

View File

@ -0,0 +1,279 @@
---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Set resource and role chain fact
set_fact:
resource_chains: "{{ tripleo_heat_resource_tree.resources | get_filtered_resources('OS::Heat::ResourceChain') }}"
role_chain: "{{ tripleo_heat_resource_tree.resources | get_filtered_resource_chains(tripleo_role_name) }}"
- name: Set service chain fact
set_fact:
service_chain: "{{ resource_chains | get_filtered_service_chain(role_chain.resources) }}"
- name: Set role service fact
set_fact:
role_services: "{{ service_chain.resources | get_filtered_role_resources(tripleo_heat_resource_tree.resources) }}"
- name: Set features facts
set_fact:
dpdk: |-
{% set service_types = role_services.values() | sum(attribute='parameters', start=[]) %}
{% set neutron_datapath = ((service_types | map('regex_search', '.*NeutronDatapathType.*') | list | length) > 0) | bool %}
{% set heat_service_types = tripleo_heat_resource_tree.resources.values() | list | sum(attribute='parameters', start=[]) %}
{% set heat_neutron_datapath = ((heat_service_types | map('regex_search', '.*NeutronDatapathType.*') | list | length) > 0) | bool %}
{{ (neutron_datapath | bool) or (heat_neutron_datapath | bool) }}
sriov: |-
{% set service_types = role_services.values() | map(attribute='type') | list %}
{{ ((service_types | map('regex_search', '.*\:\:NeutronSriovAgent') | list | length) > 0) | bool }}
hci: |-
{% set service_types = role_services.values() | map(attribute='type') | list %}
{% set novacompute = ((service_types | map('regex_search', '.*\:\:NovaCompute') | list | length) > 0) | bool %}
{% set cephosd = ((service_types | map('regex_search', '.*\:\:CephOSD') | list | length) > 0) | bool %}
{{ (novacompute | bool) and (cephosd | bool) }}
- name: Set feature fact
set_fact:
feature_dict:
DPDK: "{{ dpdk or odl_dpdk }}"
SRIOV: "{{ sriov }}"
HOST: "{{ dpdk or odl_dpdk or sriov }}"
HCI: "{{ hci }}"
- name: Set role feature fact
set_fact:
role_features: |-
{% set enabled_services = [] %}
{% for key, value in feature_dict.items() %}
{% if value | bool %}
{% set _ = enabled_services.append(key) %}
{% endif %}
{% endfor %}
{{ enabled_services }}
scheduler_hints: |-
{% set params = tripleo_heat_resource_tree.parameters.get((tripleo_role_name ~ 'SchedulerHints'), {}) %}
{{ params.get('default', {}) }}
flavor_name: |-
{% set param_name = 'Overcloud' ~ tripleo_role_name ~ 'Flavor' | replace('OvercloudControllerFlavor', 'OvercloudControlFlavor') %}
{% set params = tripleo_heat_resource_tree.parameters.get(param_name, {}) %}
{{ params.get('default', '') }}
- name: Node block
when:
- tripleo_all_nodes is undefined
block:
- name: Return available ironic hosts
os_baremetal_node_info:
cloud: undercloud
filters:
provision_state: "available"
is_maintenance: false
register: known_available_nodes
- name: Return available ironic hosts
os_baremetal_node_info:
cloud: undercloud
filters:
provision_state: "active"
is_maintenance: false
register: known_active_nodes
- name: Set all nodes fact
set_fact:
tripleo_all_nodes: "{{ known_available_nodes.baremetal_nodes | union(known_active_nodes.baremetal_nodes) }}"
- name: All node block
when:
- (tripleo_all_nodes | length) > 0
block:
- name: Scheduler hint block
when:
- (scheduler_hints | length) > 0
- role_node_uuid is undefined
block:
- name: Set hint regex fact
set_fact:
hint_regex: >-
{{ scheduler_hints.get('capabilities:node', {}) | replace('%index%', '(\d+)') }}
- name: Union all nodes
set_fact:
matching_nodes_with_hint: "{{
tripleo_all_nodes |
get_node_capabilities |
selectattr('hint', 'regex', hint_regex) |
map(attribute='uuid') |
list
}}"
- name: Set role node uuid fact
set_fact:
role_node_uuid: "{{ matching_nodes_with_hint | first }}"
when:
- (matching_nodes_with_hint | length) > 0
- name: Flavor hint block
when:
- (scheduler_hints | length) < 1
- role_node_uuid is undefined
block:
- name: Get flavor profile
tripleo_get_flavor_profile:
flavor_name: "{{ flavor_name }}"
register: flavor_profile
- name: Union all nodes
set_fact:
matching_nodes_with_profile: "{{
tripleo_all_nodes |
get_node_profile |
selectattr('profile', 'equalto', flavor_profile.profile) |
map(attribute='uuid') |
list
}}"
- name: Set role node uuid fact
set_fact:
role_node_uuid: "{{ matching_nodes_with_profile | first }}"
when:
- (matching_nodes_with_profile | length) > 0
- name: Get baremetal inspection data
tripleo_get_introspected_data:
node_id: "{{ role_node_uuid }}"
register: baremetal_data
when:
- role_node_uuid is defined
- baremetal_data is undefined
- name: Set hardware data fact
set_fact:
hw_data: "{{ baremetal_data.data }}"
when:
- baremetal_data is defined
# TODO
# handle_dpdk_feature:
# on-success:
# - get_dpdk_derive_params: <% $.role_features.contains('DPDK') %>
# - handle_sriov_feature: <% not $.role_features.contains('DPDK') %>
# get_dpdk_derive_params:
# workflow: tripleo.derive_params_formulas.v1.dpdk_derive_params
# input:
# plan: <% $.plan %>
# tripleo_role_name: <% $.tripleo_role_name %>
# tripleo_heat_resource_tree: <% $.tripleo_heat_resource_tree %>
# hw_data: <% $.hw_data %>
# user_inputs: <% $.user_inputs %>
# publish:
# derived_parameters: <% task().result.get('derived_parameters', {}) %>
# on-success: handle_sriov_feature
# on-error: set_status_failed_get_dpdk_derive_params
# handle_sriov_feature:
# on-success:
# - get_sriov_derive_params: <% $.role_features.contains('SRIOV') %>
# - handle_host_feature: <% not $.role_features.contains('SRIOV') %>
# get_sriov_derive_params:
# workflow: tripleo.derive_params_formulas.v1.sriov_derive_params
# input:
# tripleo_role_name: <% $.tripleo_role_name %>
# hw_data: <% $.hw_data %>
# derived_parameters: <% $.derived_parameters %>
# publish:
# derived_parameters: <% task().result.get('derived_parameters', {}) %>
# on-success: handle_host_feature
# on-error: set_status_failed_get_sriov_derive_params
# handle_host_feature:
# on-success:
# - get_host_derive_params: <% $.role_features.contains('HOST') %>
# - handle_hci_feature: <% not $.role_features.contains('HOST') %>
# get_host_derive_params:
# workflow: tripleo.derive_params_formulas.v1.host_derive_params
# input:
# tripleo_role_name: <% $.tripleo_role_name %>
# hw_data: <% $.hw_data %>
# user_inputs: <% $.user_inputs %>
# derived_parameters: <% $.derived_parameters %>
# publish:
# derived_parameters: <% task().result.get('derived_parameters', {}) %>
# on-success: handle_hci_feature
# on-error: set_status_failed_get_host_derive_params
# handle_hci_feature:
# on-success:
# - get_hci_derive_params: <% $.role_features.contains('HCI') %>
# get_hci_derive_params:
# workflow: tripleo.derive_params_formulas.v1.hci_derive_params
# input:
# tripleo_role_name: <% $.tripleo_role_name %>
# tripleo_heat_resource_tree: <% $.tripleo_heat_resource_tree %>
# introspection_data: <% $.hw_data %>
# user_inputs: <% $.user_inputs %>
# derived_parameters: <% $.derived_parameters %>
# publish:
# derived_parameters: <% task().result.get('derived_parameters', {}) %>
# on-error: set_status_failed_get_hci_derive_params
# # Done (no more derived parameter features)
- name: Derive parameters for HCI
when:
- hci
block:
- name: extract average guest cpu and memory
set_fact:
average_guest_cpu_utilization_percentage: "{{ item.value.average_guest_cpu_utilization_percentage }}"
average_guest_memory_size_in_mb: "{{ item.value.average_guest_memory_size_in_mb }}"
loop: "{{ lookup('dict', hci_profile_config) }}"
when: item.key == hci_profile
# Replace with a call to new a hci_derived_parameters module with these inputs
- name: set mock_hci_derived_parameters_inputs
set_fact:
mock_hci_derived_parameters_inputs:
tripleo_heat_resource_tree: "{{ tripleo_heat_resource_tree }}"
introspection_data: "{{ hw_data }}"
average_guest_cpu_utilization_percentage: "{{ average_guest_cpu_utilization_percentage }}"
average_guest_memory_size_in_mb: "{{ average_guest_memory_size_in_mb }}"
derived_parameters: {}
# hci_derived_parameters module will update derived_parameters_result instead
- name: set mock_derived_parameters_result
set_fact:
mock_derived_parameters_result:
NovaReservedHostMemory: 180224
NovaCPUAllocationRatio: 2
- name: Update derived params block
when:
- derived_parameters_result is defined
block:
- name: Reset params
tripleo_reset_params:
container: "{{ plan }}"
parameter_key: derived_parameters
- name: Update derive_parameters in plan
tripleo_plan_parameters_update:
container: "{{ plan }}"
parameter_key: 'derived_parameters'
parameters: "{{ derived_parameters_result }}"
validate: true

View File

@ -22,6 +22,7 @@
- tripleo-ansible-centos-8-molecule-tripleo_container_stop
- tripleo-ansible-centos-8-molecule-tripleo_container_tag
- tripleo-ansible-centos-8-molecule-tripleo_create_admin
- tripleo-ansible-centos-8-molecule-tripleo_derived_parameters
- tripleo-ansible-centos-8-molecule-tripleo_firewall
- tripleo-ansible-centos-8-molecule-tripleo_hieradata
- tripleo-ansible-centos-8-molecule-tripleo_hosts_entries
@ -68,6 +69,7 @@
- tripleo-ansible-centos-8-molecule-tripleo_container_stop
- tripleo-ansible-centos-8-molecule-tripleo_container_tag
- tripleo-ansible-centos-8-molecule-tripleo_create_admin
- tripleo-ansible-centos-8-molecule-tripleo_derived_parameters
- tripleo-ansible-centos-8-molecule-tripleo_firewall
- tripleo-ansible-centos-8-molecule-tripleo_hieradata
- tripleo-ansible-centos-8-molecule-tripleo_hosts_entries
@ -278,6 +280,13 @@
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo_create_admin
- job:
files:
- ^tripleo_ansible/roles/tripleo_derived_parameters/.*
name: tripleo-ansible-centos-8-molecule-tripleo_derived_parameters
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo_derived_parameters
- job:
files:
- ^tripleo_ansible/roles/tripleo_firewall/.*