Merge "Fix multistack inventory"

This commit is contained in:
Zuul 2020-04-08 20:17:12 +00:00 committed by Gerrit Code Review
commit 8be99f9b2c
10 changed files with 3137 additions and 422 deletions

View File

@ -37,50 +37,79 @@ class TripleoInventories(object):
stack_to_inv_obj_map['edge0'] = TripleoInventory('edge0')
"""
self.stack_to_inv_obj_map = stack_to_inv_obj_map
self.inventory = OrderedDict()
def merge(self):
"""Merge TripleoInventory objects into self.inventory"""
def _merge(self, dynamic=True):
"""Merge TripleoInventory objects"""
inventory = OrderedDict()
if dynamic:
inventory['_meta'] = {'hostvars': {}}
for stack, inv_obj in self.stack_to_inv_obj_map.items():
# convert each inventory object into an ordered dict
inv = inv_obj.list()
inv = inv_obj.list(dynamic)
# only want one undercloud, shouldn't matter which
if 'Undercloud' not in self.inventory.keys():
self.inventory['Undercloud'] = inv['Undercloud']
self.inventory['Undercloud']['hosts'] = {'undercloud': {}}
if 'Undercloud' not in inventory.keys():
inventory['Undercloud'] = inv['Undercloud']
if dynamic:
inventory['Undercloud']['hosts'] = ['undercloud']
else:
inventory['Undercloud']['hosts'] = {'undercloud': {}}
# add 'plans' to create a list to append to
self.inventory['Undercloud']['vars']['plans'] = []
inventory['Undercloud']['vars']['plans'] = []
# save the plan for this stack in the plans list
plan = inv['Undercloud']['vars']['plan']
self.inventory['Undercloud']['vars']['plans'].append(plan)
inventory['Undercloud']['vars']['plans'].append(plan)
for key in inv.keys():
if key != 'Undercloud':
new_key = stack + '_' + key
if key not in ('_meta', 'overcloud', stack):
# Merge into a top level group
if dynamic:
inventory.setdefault(key, {'children': []})
inventory[key]['children'].append(new_key)
inventory[key]['children'].sort()
else:
inventory.setdefault(key, {'children': {}})
inventory[key]['children'][new_key] = {}
if 'children' in inv[key].keys():
roles = []
for child in inv[key]['children']:
roles.append(stack + '_' + child)
self.inventory[new_key] = {}
self.inventory[new_key]['vars'] = inv[key]['vars']
for role in roles:
self.inventory[new_key]['children'] = {}
self.inventory[new_key]['children'][role] = {}
if key == 'overcloud':
roles.sort()
if dynamic:
inventory[new_key] = {
'children': roles
}
else:
inventory[new_key] = {
'children': {x: {} for x in roles}
}
if vars in inv[key]:
inventory[new_key]['vars'] = inv[key]['vars']
if key == 'allovercloud':
# useful to have just stack name refer to children
self.inventory[stack] = self.inventory[new_key]
if dynamic:
inventory[stack] = {'children': [new_key]}
else:
inventory[stack] = {'children': {new_key: {}}}
else:
if key != '_meta':
self.inventory[new_key] = inv[key]
self.inventory[new_key]['hosts'] = {}
self.inventory[new_key]['hosts'] = \
inv['_meta']['hostvars']
inventory[new_key] = inv[key]
elif dynamic:
inventory['_meta']['hostvars'].update(
inv['_meta'].get('hostvars', {})
)
# 'plan' doesn't make sense when using multiple plans
self.inventory['Undercloud']['vars']['plan'] = ''
inventory['Undercloud']['vars']['plan'] = ''
# sort plans list for consistency
self.inventory['Undercloud']['vars']['plans'].sort()
inventory['Undercloud']['vars']['plans'].sort()
return inventory
def list(self, dynamic=True):
return self._merge(dynamic)
def write_static_inventory(self, inventory_file_path, extra_vars=None):
"""Convert OrderedDict inventory to static yaml format in a file."""
@ -90,13 +119,15 @@ class TripleoInventories(object):
% (inventory_file_path,
",".join(allowed_extensions)))
inventory = self._merge(dynamic=False)
if extra_vars:
for var, value in extra_vars.items():
if var in self.inventory:
self.inventory[var]['vars'].update(value)
if var in inventory:
inventory[var]['vars'].update(value)
with open(inventory_file_path, 'w') as inventory_file:
yaml.dump(self.inventory, inventory_file, TemplateDumper)
yaml.dump(inventory, inventory_file, TemplateDumper)
def host(self):
# Dynamic inventory scripts must return empty json if they don't

View File

@ -92,7 +92,6 @@ class TripleoInventory(object):
undercloud_key_file=None, serial=1):
self.session = session
self.hclient = hclient
self.hosts_format_dict = False
self.host_network = host_network or HOST_NETWORK
self.auth_url = auth_url
self.cacert = cacert
@ -141,9 +140,9 @@ class TripleoInventory(object):
"""
return self.UNDERCLOUD_SERVICES
def _hosts(self, alist):
def _hosts(self, alist, dynamic=True):
"""Static yaml inventories reqire a different hosts format?!"""
if self.hosts_format_dict:
if not dynamic:
return {x: {} for x in alist}
else:
return alist
@ -158,10 +157,10 @@ class TripleoInventory(object):
return stack
def list(self):
def list(self, dynamic=True):
ret = OrderedDict({
'Undercloud': {
'hosts': self._hosts(['undercloud']),
'hosts': self._hosts(['undercloud'], dynamic),
'vars': {
'ansible_host': 'localhost',
'ansible_python_interpreter': sys.executable,
@ -205,7 +204,7 @@ class TripleoInventory(object):
ret['Undercloud']['vars']['overcloud_admin_password'] =\
admin_password
if not self.hosts_format_dict:
if dynamic:
# Prevent Ansible from repeatedly calling us to get empty host
# details
ret['_meta'] = {'hostvars': self.hostvars}
@ -263,7 +262,7 @@ class TripleoInventory(object):
children.append(role)
if self.hosts_format_dict:
if not dynamic:
hosts_format = hosts
else:
hosts_format = [h for h in hosts.keys()]
@ -304,11 +303,20 @@ class TripleoInventory(object):
self.get_overcloud_environment().get(
'parameter_defaults', {}).get('ContainerCli')
ret['overcloud'] = {
'children': self._hosts(sorted(children)),
ret['allovercloud'] = {
'children': self._hosts(sorted(children), dynamic),
'vars': overcloud_vars
}
ret[self.plan_name] = {
'children': self._hosts(['allovercloud'], dynamic)
}
if self.plan_name != 'overcloud':
ret['overcloud'] = {
'children': self._hosts(['allovercloud'], dynamic),
'deprecated': 'Deprecated by allovercloud group in Ussuri'
}
# Associate services with roles
roles_by_service = self.get_roles_by_service(
self.stack_outputs.get('EnabledServices', {}))
@ -340,7 +348,7 @@ class TripleoInventory(object):
if service_children:
svc_host = service.lower()
ret[svc_host] = {
'children': self._hosts(service_children),
'children': self._hosts(service_children, dynamic),
'vars': {
'ansible_ssh_user': self.ansible_ssh_user
}
@ -368,8 +376,7 @@ class TripleoInventory(object):
# For some reason the json/yaml format needed for static and
# dynamic inventories is different for the hosts/children?!
self.hosts_format_dict = True
inventory = self.list()
inventory = self.list(dynamic=False)
if extra_vars:
for var, value in extra_vars.items():

View File

@ -0,0 +1,381 @@
{
"CellController": {
"hosts": [
"cell1-cellcontrol-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"serial": "1",
"tripleo_role_name": "CellController",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"Compute": {
"hosts": [
"cell1-compute-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"serial": "1",
"tripleo_role_name": "Compute",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"Undercloud": {
"hosts": [
"undercloud"
],
"vars": {
"ansible_connection": "local",
"ansible_host": "localhost",
"ansible_python_interpreter": "/usr/bin/python2",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"auth_url": "https://192.168.24.2:13000",
"cacert": "/etc/pki/ca-trust/source/anchors/cm-local-ca.pem",
"os_auth_token": "gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg",
"overcloud_admin_password": "9RDyelRD5PT5Jk6q4efjYG6Es",
"overcloud_horizon_url": "https://10.0.0.5:443/dashboard",
"overcloud_keystone_url": "https://10.0.0.5:13000",
"plan": "cell1",
"project_name": "admin",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"undercloud_swift_url": "https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763",
"username": "admin"
}
},
"_meta": {
"hostvars": {
"cell1-cellcontrol-0": {
"ansible_host": "192.168.24.29",
"canonical_hostname": "cell1-cellcontrol-0.localdomain",
"ctlplane_hostname": "cell1-cellcontrol-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.29",
"deploy_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"external_hostname": "cell1-cellcontrol-0.external.localdomain",
"external_ip": "10.0.0.38",
"internal_api_hostname": "cell1-cellcontrol-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.119",
"management_ip": "192.168.24.29",
"storage_hostname": "cell1-cellcontrol-0.storage.localdomain",
"storage_ip": "172.16.1.167",
"storage_mgmt_hostname": "cell1-cellcontrol-0.storagemgmt.localdomain",
"storage_mgmt_ip": "172.16.3.183",
"tenant_hostname": "cell1-cellcontrol-0.tenant.localdomain",
"tenant_ip": "172.16.0.125"
},
"cell1-compute-0": {
"ansible_host": "192.168.24.10",
"canonical_hostname": "cell1-compute-0.localdomain",
"ctlplane_hostname": "cell1-compute-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.10",
"deploy_server_id": "5b31842e-1118-4961-95cf-47d7a326e839",
"external_ip": "192.168.24.10",
"internal_api_hostname": "cell1-compute-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.18",
"management_ip": "192.168.24.10",
"storage_hostname": "cell1-compute-0.storage.localdomain",
"storage_ip": "172.16.1.218",
"storage_mgmt_ip": "192.168.24.10",
"tenant_hostname": "cell1-compute-0.tenant.localdomain",
"tenant_ip": "172.16.0.27"
}
}
},
"allovercloud": {
"children": [
"CellController",
"Compute"
],
"vars": {
"container_cli": "podman",
"ctlplane_vip": "192.168.24.21",
"external_vip": "10.0.0.6",
"internal_api_vip": "172.16.2.11",
"redis_vip": "192.168.24.21",
"storage_mgmt_vip": "172.16.3.26",
"storage_vip": "172.16.1.131"
}
},
"boot_params_service": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ca_certs": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"cell1": {
"children": [
"allovercloud"
]
},
"certmonger_user": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"chrony": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"container_image_prepare": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"haproxy": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"iscsid": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"keepalived": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"kernel": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"logrotate_crond": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"mysql": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"mysql_client": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_compute": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_conductor": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_libvirt": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_libvirt_guests": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_metadata": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_migration_target": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_vnc_proxy": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"oslo_messaging_rpc": {
"children": [
"CellController"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"overcloud": {
"children": [
"allovercloud"
],
"deprecated": "Deprecated by allovercloud group in Ussuri"
},
"ovn_controller": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ovn_metadata": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"podman": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"snmp": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"sshd": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"timezone": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tripleo_firewall": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tripleo_packages": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tuned": {
"children": [
"CellController",
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
}
}

View File

@ -0,0 +1,197 @@
Undercloud:
hosts:
undercloud: {}
vars:
ansible_connection: local
ansible_host: localhost
ansible_python_interpreter: /usr/bin/python2
ansible_remote_tmp: /tmp/ansible-${USER}
auth_url: https://192.168.24.2:13000
cacert: /etc/pki/ca-trust/source/anchors/cm-local-ca.pem
os_auth_token: gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg
overcloud_admin_password: 9RDyelRD5PT5Jk6q4efjYG6Es
overcloud_horizon_url: https://10.0.0.5:443/dashboard
overcloud_keystone_url: https://10.0.0.5:13000
plan: cell1
project_name: admin
undercloud_service_list: [tripleo_nova_compute, tripleo_heat_engine, tripleo_ironic_conductor,
tripleo_swift_container_server, tripleo_swift_object_server, tripleo_mistral_engine]
undercloud_swift_url: https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763
username: admin
CellController:
hosts:
cell1-cellcontrol-0: {ansible_host: 192.168.24.29, canonical_hostname: cell1-cellcontrol-0.localdomain,
ctlplane_hostname: cell1-cellcontrol-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.29,
deploy_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23, external_hostname: cell1-cellcontrol-0.external.localdomain,
external_ip: 10.0.0.38, internal_api_hostname: cell1-cellcontrol-0.internalapi.localdomain,
internal_api_ip: 172.16.2.119, management_ip: 192.168.24.29, storage_hostname: cell1-cellcontrol-0.storage.localdomain,
storage_ip: 172.16.1.167, storage_mgmt_hostname: cell1-cellcontrol-0.storagemgmt.localdomain,
storage_mgmt_ip: 172.16.3.183, tenant_hostname: cell1-cellcontrol-0.tenant.localdomain,
tenant_ip: 172.16.0.125}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23
serial: '1'
tripleo_role_name: CellController
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
Compute:
hosts:
cell1-compute-0: {ansible_host: 192.168.24.10, canonical_hostname: cell1-compute-0.localdomain,
ctlplane_hostname: cell1-compute-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.10,
deploy_server_id: 5b31842e-1118-4961-95cf-47d7a326e839, external_ip: 192.168.24.10,
internal_api_hostname: cell1-compute-0.internalapi.localdomain, internal_api_ip: 172.16.2.18,
management_ip: 192.168.24.10, storage_hostname: cell1-compute-0.storage.localdomain,
storage_ip: 172.16.1.218, storage_mgmt_ip: 192.168.24.10, tenant_hostname: cell1-compute-0.tenant.localdomain,
tenant_ip: 172.16.0.27}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23
serial: '1'
tripleo_role_name: Compute
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
allovercloud:
children:
CellController: {}
Compute: {}
vars: {container_cli: podman, ctlplane_vip: 192.168.24.21, external_vip: 10.0.0.6,
internal_api_vip: 172.16.2.11, redis_vip: 192.168.24.21, storage_mgmt_vip: 172.16.3.26,
storage_vip: 172.16.1.131}
cell1:
children:
allovercloud: {}
overcloud:
children:
allovercloud: {}
deprecated: Deprecated by allovercloud group in Ussuri
kernel:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
keepalived:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
mysql:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
nova_libvirt:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
container_image_prepare:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
timezone:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
iscsid:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
nova_libvirt_guests:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
tripleo_firewall:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
snmp:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
certmonger_user:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
boot_params_service:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
oslo_messaging_rpc:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
nova_vnc_proxy:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
nova_metadata:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
mysql_client:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
nova_migration_target:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
podman:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
tripleo_packages:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
nova_conductor:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
nova_compute:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
logrotate_crond:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
haproxy:
children:
CellController: {}
vars: {ansible_ssh_user: heat-admin}
sshd:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
ovn_metadata:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
tuned:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
chrony:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
ca_certs:
children:
CellController: {}
Compute: {}
vars: {ansible_ssh_user: heat-admin}
ovn_controller:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}

View File

@ -0,0 +1,970 @@
{
"CellController": {
"children": [
"cell1_CellController"
]
},
"Compute": {
"children": [
"cell1_Compute",
"overcloud_Compute"
]
},
"Controller": {
"children": [
"overcloud_Controller"
]
},
"Undercloud": {
"hosts": [
"undercloud"
],
"vars": {
"ansible_connection": "local",
"ansible_host": "localhost",
"ansible_python_interpreter": "/usr/bin/python2",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"auth_url": "https://192.168.24.2:13000",
"cacert": "/etc/pki/ca-trust/source/anchors/cm-local-ca.pem",
"os_auth_token": "gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg",
"overcloud_admin_password": "9RDyelRD5PT5Jk6q4efjYG6Es",
"overcloud_horizon_url": "https://10.0.0.5:443/dashboard",
"overcloud_keystone_url": "https://10.0.0.5:13000",
"plan": "",
"plans": [
"cell1",
"overcloud"
],
"project_name": "admin",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"undercloud_swift_url": "https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763",
"username": "admin"
}
},
"_meta": {
"hostvars": {
"cell1-cellcontrol-0": {
"ansible_host": "192.168.24.29",
"canonical_hostname": "cell1-cellcontrol-0.localdomain",
"ctlplane_hostname": "cell1-cellcontrol-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.29",
"deploy_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"external_hostname": "cell1-cellcontrol-0.external.localdomain",
"external_ip": "10.0.0.38",
"internal_api_hostname": "cell1-cellcontrol-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.119",
"management_ip": "192.168.24.29",
"storage_hostname": "cell1-cellcontrol-0.storage.localdomain",
"storage_ip": "172.16.1.167",
"storage_mgmt_hostname": "cell1-cellcontrol-0.storagemgmt.localdomain",
"storage_mgmt_ip": "172.16.3.183",
"tenant_hostname": "cell1-cellcontrol-0.tenant.localdomain",
"tenant_ip": "172.16.0.125"
},
"cell1-compute-0": {
"ansible_host": "192.168.24.10",
"canonical_hostname": "cell1-compute-0.localdomain",
"ctlplane_hostname": "cell1-compute-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.10",
"deploy_server_id": "5b31842e-1118-4961-95cf-47d7a326e839",
"external_ip": "192.168.24.10",
"internal_api_hostname": "cell1-compute-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.18",
"management_ip": "192.168.24.10",
"storage_hostname": "cell1-compute-0.storage.localdomain",
"storage_ip": "172.16.1.218",
"storage_mgmt_ip": "192.168.24.10",
"tenant_hostname": "cell1-compute-0.tenant.localdomain",
"tenant_ip": "172.16.0.27"
},
"overcloud-controller-0": {
"ansible_host": "192.168.24.12",
"canonical_hostname": "overcloud-controller-0.localdomain",
"ctlplane_hostname": "overcloud-controller-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.12",
"deploy_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"external_hostname": "overcloud-controller-0.external.localdomain",
"external_ip": "10.0.0.10",
"internal_api_hostname": "overcloud-controller-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.199",
"management_ip": "192.168.24.12",
"storage_hostname": "overcloud-controller-0.storage.localdomain",
"storage_ip": "172.16.1.13",
"storage_mgmt_hostname": "overcloud-controller-0.storagemgmt.localdomain",
"storage_mgmt_ip": "172.16.3.89",
"tenant_hostname": "overcloud-controller-0.tenant.localdomain",
"tenant_ip": "172.16.0.167"
},
"overcloud-novacompute-0": {
"ansible_host": "192.168.24.13",
"canonical_hostname": "overcloud-novacompute-0.localdomain",
"ctlplane_hostname": "overcloud-novacompute-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.13",
"deploy_server_id": "c5c20c87-60f8-4dc9-a0e8-1f185c4b8a8c",
"external_ip": "192.168.24.13",
"internal_api_hostname": "overcloud-novacompute-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.241",
"management_ip": "192.168.24.13",
"storage_hostname": "overcloud-novacompute-0.storage.localdomain",
"storage_ip": "172.16.1.235",
"storage_mgmt_ip": "192.168.24.13",
"tenant_hostname": "overcloud-novacompute-0.tenant.localdomain",
"tenant_ip": "172.16.0.242"
}
}
},
"allovercloud": {
"children": [
"cell1_allovercloud",
"overcloud_allovercloud"
]
},
"boot_params_service": {
"children": [
"cell1_boot_params_service",
"overcloud_boot_params_service"
]
},
"ca_certs": {
"children": [
"cell1_ca_certs",
"overcloud_ca_certs"
]
},
"cell1": {
"children": [
"cell1_allovercloud"
]
},
"cell1_CellController": {
"hosts": [
"cell1-cellcontrol-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"serial": "1",
"tripleo_role_name": "CellController",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"cell1_Compute": {
"hosts": [
"cell1-compute-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "2a668e02-96b3-48a5-9cf2-7bde46830e23",
"serial": "1",
"tripleo_role_name": "Compute",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"cell1_allovercloud": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_boot_params_service": {
"children": [
"cell1_Compute"
]
},
"cell1_ca_certs": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_cell1": {
"children": [
"cell1_allovercloud"
]
},
"cell1_certmonger_user": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_chrony": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_container_image_prepare": {
"children": [
"cell1_CellController"
]
},
"cell1_haproxy": {
"children": [
"cell1_CellController"
]
},
"cell1_iscsid": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_keepalived": {
"children": [
"cell1_CellController"
]
},
"cell1_kernel": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_logrotate_crond": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_mysql": {
"children": [
"cell1_CellController"
]
},
"cell1_mysql_client": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_nova_compute": {
"children": [
"cell1_Compute"
]
},
"cell1_nova_conductor": {
"children": [
"cell1_CellController"
]
},
"cell1_nova_libvirt": {
"children": [
"cell1_Compute"
]
},
"cell1_nova_libvirt_guests": {
"children": [
"cell1_Compute"
]
},
"cell1_nova_metadata": {
"children": [
"cell1_CellController"
]
},
"cell1_nova_migration_target": {
"children": [
"cell1_Compute"
]
},
"cell1_nova_vnc_proxy": {
"children": [
"cell1_CellController"
]
},
"cell1_oslo_messaging_rpc": {
"children": [
"cell1_CellController"
]
},
"cell1_overcloud": {
"children": [
"cell1_allovercloud"
]
},
"cell1_ovn_controller": {
"children": [
"cell1_Compute"
]
},
"cell1_ovn_metadata": {
"children": [
"cell1_Compute"
]
},
"cell1_podman": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_snmp": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_sshd": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_timezone": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_tripleo_firewall": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_tripleo_packages": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"cell1_tuned": {
"children": [
"cell1_CellController",
"cell1_Compute"
]
},
"certmonger_user": {
"children": [
"cell1_certmonger_user",
"overcloud_certmonger_user"
]
},
"chrony": {
"children": [
"cell1_chrony",
"overcloud_chrony"
]
},
"cinder_api": {
"children": [
"overcloud_cinder_api"
]
},
"cinder_scheduler": {
"children": [
"overcloud_cinder_scheduler"
]
},
"cinder_volume": {
"children": [
"overcloud_cinder_volume"
]
},
"container_image_prepare": {
"children": [
"cell1_container_image_prepare",
"overcloud_container_image_prepare"
]
},
"glance_api": {
"children": [
"overcloud_glance_api"
]
},
"haproxy": {
"children": [
"cell1_haproxy",
"overcloud_haproxy"
]
},
"heat_api": {
"children": [
"overcloud_heat_api"
]
},
"heat_api_cfn": {
"children": [
"overcloud_heat_api_cfn"
]
},
"heat_api_cloudwatch_disabled": {
"children": [
"overcloud_heat_api_cloudwatch_disabled"
]
},
"heat_engine": {
"children": [
"overcloud_heat_engine"
]
},
"horizon": {
"children": [
"overcloud_horizon"
]
},
"iscsid": {
"children": [
"cell1_iscsid",
"overcloud_iscsid"
]
},
"keepalived": {
"children": [
"cell1_keepalived",
"overcloud_keepalived"
]
},
"kernel": {
"children": [
"cell1_kernel",
"overcloud_kernel"
]
},
"keystone": {
"children": [
"overcloud_keystone"
]
},
"keystone_admin_api": {
"children": [
"overcloud_keystone_admin_api"
]
},
"keystone_public_api": {
"children": [
"overcloud_keystone_public_api"
]
},
"logrotate_crond": {
"children": [
"cell1_logrotate_crond",
"overcloud_logrotate_crond"
]
},
"memcached": {
"children": [
"overcloud_memcached"
]
},
"mysql": {
"children": [
"cell1_mysql",
"overcloud_mysql"
]
},
"mysql_client": {
"children": [
"cell1_mysql_client",
"overcloud_mysql_client"
]
},
"neutron_api": {
"children": [
"overcloud_neutron_api"
]
},
"neutron_plugin_ml2_ovn": {
"children": [
"overcloud_neutron_plugin_ml2_ovn"
]
},
"nova_api": {
"children": [
"overcloud_nova_api"
]
},
"nova_compute": {
"children": [
"cell1_nova_compute",
"overcloud_nova_compute"
]
},
"nova_conductor": {
"children": [
"cell1_nova_conductor",
"overcloud_nova_conductor"
]
},
"nova_libvirt": {
"children": [
"cell1_nova_libvirt",
"overcloud_nova_libvirt"
]
},
"nova_libvirt_guests": {
"children": [
"cell1_nova_libvirt_guests",
"overcloud_nova_libvirt_guests"
]
},
"nova_metadata": {
"children": [
"cell1_nova_metadata",
"overcloud_nova_metadata"
]
},
"nova_migration_target": {
"children": [
"cell1_nova_migration_target",
"overcloud_nova_migration_target"
]
},
"nova_scheduler": {
"children": [
"overcloud_nova_scheduler"
]
},
"nova_vnc_proxy": {
"children": [
"cell1_nova_vnc_proxy",
"overcloud_nova_vnc_proxy"
]
},
"oslo_messaging_notify": {
"children": [
"overcloud_oslo_messaging_notify"
]
},
"oslo_messaging_rpc": {
"children": [
"cell1_oslo_messaging_rpc",
"overcloud_oslo_messaging_rpc"
]
},
"overcloud": {
"children": [
"overcloud_allovercloud"
]
},
"overcloud_Compute": {
"hosts": [
"overcloud-novacompute-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"serial": "1",
"tripleo_role_name": "Compute",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"overcloud_Controller": {
"hosts": [
"overcloud-controller-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"serial": "1",
"tripleo_role_name": "Controller",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"overcloud_allovercloud": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_boot_params_service": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_ca_certs": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_certmonger_user": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_chrony": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_cinder_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_cinder_scheduler": {
"children": [
"overcloud_Controller"
]
},
"overcloud_cinder_volume": {
"children": [
"overcloud_Controller"
]
},
"overcloud_container_image_prepare": {
"children": [
"overcloud_Controller"
]
},
"overcloud_glance_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_haproxy": {
"children": [
"overcloud_Controller"
]
},
"overcloud_heat_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_heat_api_cfn": {
"children": [
"overcloud_Controller"
]
},
"overcloud_heat_api_cloudwatch_disabled": {
"children": [
"overcloud_Controller"
]
},
"overcloud_heat_engine": {
"children": [
"overcloud_Controller"
]
},
"overcloud_horizon": {
"children": [
"overcloud_Controller"
]
},
"overcloud_iscsid": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_keepalived": {
"children": [
"overcloud_Controller"
]
},
"overcloud_kernel": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_keystone": {
"children": [
"overcloud_Controller"
]
},
"overcloud_keystone_admin_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_keystone_public_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_logrotate_crond": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_memcached": {
"children": [
"overcloud_Controller"
]
},
"overcloud_mysql": {
"children": [
"overcloud_Controller"
]
},
"overcloud_mysql_client": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_neutron_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_neutron_plugin_ml2_ovn": {
"children": [
"overcloud_Controller"
]
},
"overcloud_nova_api": {
"children": [
"overcloud_Controller"
]
},
"overcloud_nova_compute": {
"children": [
"overcloud_Compute"
]
},
"overcloud_nova_conductor": {
"children": [
"overcloud_Controller"
]
},
"overcloud_nova_libvirt": {
"children": [
"overcloud_Compute"
]
},
"overcloud_nova_libvirt_guests": {
"children": [
"overcloud_Compute"
]
},
"overcloud_nova_metadata": {
"children": [
"overcloud_Controller"
]
},
"overcloud_nova_migration_target": {
"children": [
"overcloud_Compute"
]
},
"overcloud_nova_scheduler": {
"children": [
"overcloud_Controller"
]
},
"overcloud_nova_vnc_proxy": {
"children": [
"overcloud_Controller"
]
},
"overcloud_oslo_messaging_notify": {
"children": [
"overcloud_Controller"
]
},
"overcloud_oslo_messaging_rpc": {
"children": [
"overcloud_Controller"
]
},
"overcloud_overcloud": {
"children": [
"overcloud_allovercloud"
]
},
"overcloud_ovn_controller": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_ovn_dbs": {
"children": [
"overcloud_Controller"
]
},
"overcloud_ovn_metadata": {
"children": [
"overcloud_Compute"
]
},
"overcloud_placement": {
"children": [
"overcloud_Controller"
]
},
"overcloud_podman": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_snmp": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_sshd": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_swift_proxy": {
"children": [
"overcloud_Controller"
]
},
"overcloud_swift_ringbuilder": {
"children": [
"overcloud_Controller"
]
},
"overcloud_swift_storage": {
"children": [
"overcloud_Controller"
]
},
"overcloud_timezone": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_tripleo_firewall": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_tripleo_packages": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"overcloud_tuned": {
"children": [
"overcloud_Compute",
"overcloud_Controller"
]
},
"ovn_controller": {
"children": [
"cell1_ovn_controller",
"overcloud_ovn_controller"
]
},
"ovn_dbs": {
"children": [
"overcloud_ovn_dbs"
]
},
"ovn_metadata": {
"children": [
"cell1_ovn_metadata",
"overcloud_ovn_metadata"
]
},
"placement": {
"children": [
"overcloud_placement"
]
},
"podman": {
"children": [
"cell1_podman",
"overcloud_podman"
]
},
"snmp": {
"children": [
"cell1_snmp",
"overcloud_snmp"
]
},
"sshd": {
"children": [
"cell1_sshd",
"overcloud_sshd"
]
},
"swift_proxy": {
"children": [
"overcloud_swift_proxy"
]
},
"swift_ringbuilder": {
"children": [
"overcloud_swift_ringbuilder"
]
},
"swift_storage": {
"children": [
"overcloud_swift_storage"
]
},
"timezone": {
"children": [
"cell1_timezone",
"overcloud_timezone"
]
},
"tripleo_firewall": {
"children": [
"cell1_tripleo_firewall",
"overcloud_tripleo_firewall"
]
},
"tripleo_packages": {
"children": [
"cell1_tripleo_packages",
"overcloud_tripleo_packages"
]
},
"tuned": {
"children": [
"cell1_tuned",
"overcloud_tuned"
]
}
}

View File

@ -0,0 +1,582 @@
Undercloud:
hosts:
undercloud: {}
vars:
ansible_connection: local
ansible_host: localhost
ansible_python_interpreter: /usr/bin/python2
ansible_remote_tmp: /tmp/ansible-${USER}
auth_url: https://192.168.24.2:13000
cacert: /etc/pki/ca-trust/source/anchors/cm-local-ca.pem
os_auth_token: gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg
overcloud_admin_password: 9RDyelRD5PT5Jk6q4efjYG6Es
overcloud_horizon_url: https://10.0.0.5:443/dashboard
overcloud_keystone_url: https://10.0.0.5:13000
plan: ''
plans: [cell1, overcloud]
project_name: admin
undercloud_service_list: [tripleo_nova_compute, tripleo_heat_engine, tripleo_ironic_conductor,
tripleo_swift_container_server, tripleo_swift_object_server, tripleo_mistral_engine]
undercloud_swift_url: https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763
username: admin
CellController:
children:
cell1_CellController: {}
cell1_CellController:
hosts:
cell1-cellcontrol-0: {ansible_host: 192.168.24.29, canonical_hostname: cell1-cellcontrol-0.localdomain,
ctlplane_hostname: cell1-cellcontrol-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.29,
deploy_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23, external_hostname: cell1-cellcontrol-0.external.localdomain,
external_ip: 10.0.0.38, internal_api_hostname: cell1-cellcontrol-0.internalapi.localdomain,
internal_api_ip: 172.16.2.119, management_ip: 192.168.24.29, storage_hostname: cell1-cellcontrol-0.storage.localdomain,
storage_ip: 172.16.1.167, storage_mgmt_hostname: cell1-cellcontrol-0.storagemgmt.localdomain,
storage_mgmt_ip: 172.16.3.183, tenant_hostname: cell1-cellcontrol-0.tenant.localdomain,
tenant_ip: 172.16.0.125}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23
serial: '1'
tripleo_role_name: CellController
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
Compute:
children:
cell1_Compute: {}
overcloud_Compute: {}
cell1_Compute:
hosts:
cell1-compute-0: {ansible_host: 192.168.24.10, canonical_hostname: cell1-compute-0.localdomain,
ctlplane_hostname: cell1-compute-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.10,
deploy_server_id: 5b31842e-1118-4961-95cf-47d7a326e839, external_ip: 192.168.24.10,
internal_api_hostname: cell1-compute-0.internalapi.localdomain, internal_api_ip: 172.16.2.18,
management_ip: 192.168.24.10, storage_hostname: cell1-compute-0.storage.localdomain,
storage_ip: 172.16.1.218, storage_mgmt_ip: 192.168.24.10, tenant_hostname: cell1-compute-0.tenant.localdomain,
tenant_ip: 172.16.0.27}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 2a668e02-96b3-48a5-9cf2-7bde46830e23
serial: '1'
tripleo_role_name: Compute
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
allovercloud:
children:
cell1_allovercloud: {}
overcloud_allovercloud: {}
cell1_allovercloud:
children:
cell1_CellController: {}
cell1_Compute: {}
cell1:
children:
cell1_allovercloud: {}
cell1_cell1:
children:
cell1_allovercloud: {}
cell1_overcloud:
children:
cell1_allovercloud: {}
kernel:
children:
cell1_kernel: {}
overcloud_kernel: {}
cell1_kernel:
children:
cell1_CellController: {}
cell1_Compute: {}
keepalived:
children:
cell1_keepalived: {}
overcloud_keepalived: {}
cell1_keepalived:
children:
cell1_CellController: {}
mysql:
children:
cell1_mysql: {}
overcloud_mysql: {}
cell1_mysql:
children:
cell1_CellController: {}
nova_libvirt:
children:
cell1_nova_libvirt: {}
overcloud_nova_libvirt: {}
cell1_nova_libvirt:
children:
cell1_Compute: {}
container_image_prepare:
children:
cell1_container_image_prepare: {}
overcloud_container_image_prepare: {}
cell1_container_image_prepare:
children:
cell1_CellController: {}
timezone:
children:
cell1_timezone: {}
overcloud_timezone: {}
cell1_timezone:
children:
cell1_CellController: {}
cell1_Compute: {}
iscsid:
children:
cell1_iscsid: {}
overcloud_iscsid: {}
cell1_iscsid:
children:
cell1_CellController: {}
cell1_Compute: {}
nova_libvirt_guests:
children:
cell1_nova_libvirt_guests: {}
overcloud_nova_libvirt_guests: {}
cell1_nova_libvirt_guests:
children:
cell1_Compute: {}
tripleo_firewall:
children:
cell1_tripleo_firewall: {}
overcloud_tripleo_firewall: {}
cell1_tripleo_firewall:
children:
cell1_CellController: {}
cell1_Compute: {}
snmp:
children:
cell1_snmp: {}
overcloud_snmp: {}
cell1_snmp:
children:
cell1_CellController: {}
cell1_Compute: {}
certmonger_user:
children:
cell1_certmonger_user: {}
overcloud_certmonger_user: {}
cell1_certmonger_user:
children:
cell1_CellController: {}
cell1_Compute: {}
boot_params_service:
children:
cell1_boot_params_service: {}
overcloud_boot_params_service: {}
cell1_boot_params_service:
children:
cell1_Compute: {}
oslo_messaging_rpc:
children:
cell1_oslo_messaging_rpc: {}
overcloud_oslo_messaging_rpc: {}
cell1_oslo_messaging_rpc:
children:
cell1_CellController: {}
nova_vnc_proxy:
children:
cell1_nova_vnc_proxy: {}
overcloud_nova_vnc_proxy: {}
cell1_nova_vnc_proxy:
children:
cell1_CellController: {}
nova_metadata:
children:
cell1_nova_metadata: {}
overcloud_nova_metadata: {}
cell1_nova_metadata:
children:
cell1_CellController: {}
mysql_client:
children:
cell1_mysql_client: {}
overcloud_mysql_client: {}
cell1_mysql_client:
children:
cell1_CellController: {}
cell1_Compute: {}
nova_migration_target:
children:
cell1_nova_migration_target: {}
overcloud_nova_migration_target: {}
cell1_nova_migration_target:
children:
cell1_Compute: {}
podman:
children:
cell1_podman: {}
overcloud_podman: {}
cell1_podman:
children:
cell1_CellController: {}
cell1_Compute: {}
tripleo_packages:
children:
cell1_tripleo_packages: {}
overcloud_tripleo_packages: {}
cell1_tripleo_packages:
children:
cell1_CellController: {}
cell1_Compute: {}
nova_conductor:
children:
cell1_nova_conductor: {}
overcloud_nova_conductor: {}
cell1_nova_conductor:
children:
cell1_CellController: {}
nova_compute:
children:
cell1_nova_compute: {}
overcloud_nova_compute: {}
cell1_nova_compute:
children:
cell1_Compute: {}
logrotate_crond:
children:
cell1_logrotate_crond: {}
overcloud_logrotate_crond: {}
cell1_logrotate_crond:
children:
cell1_CellController: {}
cell1_Compute: {}
haproxy:
children:
cell1_haproxy: {}
overcloud_haproxy: {}
cell1_haproxy:
children:
cell1_CellController: {}
sshd:
children:
cell1_sshd: {}
overcloud_sshd: {}
cell1_sshd:
children:
cell1_CellController: {}
cell1_Compute: {}
ovn_metadata:
children:
cell1_ovn_metadata: {}
overcloud_ovn_metadata: {}
cell1_ovn_metadata:
children:
cell1_Compute: {}
tuned:
children:
cell1_tuned: {}
overcloud_tuned: {}
cell1_tuned:
children:
cell1_CellController: {}
cell1_Compute: {}
chrony:
children:
cell1_chrony: {}
overcloud_chrony: {}
cell1_chrony:
children:
cell1_CellController: {}
cell1_Compute: {}
ca_certs:
children:
cell1_ca_certs: {}
overcloud_ca_certs: {}
cell1_ca_certs:
children:
cell1_CellController: {}
cell1_Compute: {}
ovn_controller:
children:
cell1_ovn_controller: {}
overcloud_ovn_controller: {}
cell1_ovn_controller:
children:
cell1_Compute: {}
Controller:
children:
overcloud_Controller: {}
overcloud_Controller:
hosts:
overcloud-controller-0: {ansible_host: 192.168.24.12, canonical_hostname: overcloud-controller-0.localdomain,
ctlplane_hostname: overcloud-controller-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.12,
deploy_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2, external_hostname: overcloud-controller-0.external.localdomain,
external_ip: 10.0.0.10, internal_api_hostname: overcloud-controller-0.internalapi.localdomain,
internal_api_ip: 172.16.2.199, management_ip: 192.168.24.12, storage_hostname: overcloud-controller-0.storage.localdomain,
storage_ip: 172.16.1.13, storage_mgmt_hostname: overcloud-controller-0.storagemgmt.localdomain,
storage_mgmt_ip: 172.16.3.89, tenant_hostname: overcloud-controller-0.tenant.localdomain,
tenant_ip: 172.16.0.167}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2
serial: '1'
tripleo_role_name: Controller
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
overcloud_Compute:
hosts:
overcloud-novacompute-0: {ansible_host: 192.168.24.13, canonical_hostname: overcloud-novacompute-0.localdomain,
ctlplane_hostname: overcloud-novacompute-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.13,
deploy_server_id: c5c20c87-60f8-4dc9-a0e8-1f185c4b8a8c, external_ip: 192.168.24.13,
internal_api_hostname: overcloud-novacompute-0.internalapi.localdomain, internal_api_ip: 172.16.2.241,
management_ip: 192.168.24.13, storage_hostname: overcloud-novacompute-0.storage.localdomain,
storage_ip: 172.16.1.235, storage_mgmt_ip: 192.168.24.13, tenant_hostname: overcloud-novacompute-0.tenant.localdomain,
tenant_ip: 172.16.0.242}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2
serial: '1'
tripleo_role_name: Compute
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
overcloud_allovercloud:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud:
children:
overcloud_allovercloud: {}
overcloud_overcloud:
children:
overcloud_allovercloud: {}
overcloud_kernel:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_nova_conductor:
children:
overcloud_Controller: {}
overcloud_snmp:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_mysql:
children:
overcloud_Controller: {}
cinder_api:
children:
overcloud_cinder_api: {}
overcloud_cinder_api:
children:
overcloud_Controller: {}
swift_proxy:
children:
overcloud_swift_proxy: {}
overcloud_swift_proxy:
children:
overcloud_Controller: {}
swift_ringbuilder:
children:
overcloud_swift_ringbuilder: {}
overcloud_swift_ringbuilder:
children:
overcloud_Controller: {}
heat_api:
children:
overcloud_heat_api: {}
overcloud_heat_api:
children:
overcloud_Controller: {}
overcloud_container_image_prepare:
children:
overcloud_Controller: {}
overcloud_timezone:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_iscsid:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_boot_params_service:
children:
overcloud_Compute: {}
overcloud_Controller: {}
heat_api_cloudwatch_disabled:
children:
overcloud_heat_api_cloudwatch_disabled: {}
overcloud_heat_api_cloudwatch_disabled:
children:
overcloud_Controller: {}
overcloud_tripleo_firewall:
children:
overcloud_Compute: {}
overcloud_Controller: {}
swift_storage:
children:
overcloud_swift_storage: {}
overcloud_swift_storage:
children:
overcloud_Controller: {}
keystone_admin_api:
children:
overcloud_keystone_admin_api: {}
overcloud_keystone_admin_api:
children:
overcloud_Controller: {}
overcloud_keepalived:
children:
overcloud_Controller: {}
overcloud_certmonger_user:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_mysql_client:
children:
overcloud_Compute: {}
overcloud_Controller: {}
glance_api:
children:
overcloud_glance_api: {}
overcloud_glance_api:
children:
overcloud_Controller: {}
keystone:
children:
overcloud_keystone: {}
overcloud_keystone:
children:
overcloud_Controller: {}
cinder_volume:
children:
overcloud_cinder_volume: {}
overcloud_cinder_volume:
children:
overcloud_Controller: {}
ovn_dbs:
children:
overcloud_ovn_dbs: {}
overcloud_ovn_dbs:
children:
overcloud_Controller: {}
memcached:
children:
overcloud_memcached: {}
overcloud_memcached:
children:
overcloud_Controller: {}
overcloud_oslo_messaging_rpc:
children:
overcloud_Controller: {}
overcloud_nova_vnc_proxy:
children:
overcloud_Controller: {}
oslo_messaging_notify:
children:
overcloud_oslo_messaging_notify: {}
overcloud_oslo_messaging_notify:
children:
overcloud_Controller: {}
keystone_public_api:
children:
overcloud_keystone_public_api: {}
overcloud_keystone_public_api:
children:
overcloud_Controller: {}
nova_api:
children:
overcloud_nova_api: {}
overcloud_nova_api:
children:
overcloud_Controller: {}
overcloud_nova_metadata:
children:
overcloud_Controller: {}
heat_engine:
children:
overcloud_heat_engine: {}
overcloud_heat_engine:
children:
overcloud_Controller: {}
overcloud_nova_migration_target:
children:
overcloud_Compute: {}
overcloud_podman:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_tripleo_packages:
children:
overcloud_Compute: {}
overcloud_Controller: {}
nova_scheduler:
children:
overcloud_nova_scheduler: {}
overcloud_nova_scheduler:
children:
overcloud_Controller: {}
overcloud_nova_compute:
children:
overcloud_Compute: {}
overcloud_nova_libvirt_guests:
children:
overcloud_Compute: {}
neutron_plugin_ml2_ovn:
children:
overcloud_neutron_plugin_ml2_ovn: {}
overcloud_neutron_plugin_ml2_ovn:
children:
overcloud_Controller: {}
overcloud_logrotate_crond:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_haproxy:
children:
overcloud_Controller: {}
overcloud_sshd:
children:
overcloud_Compute: {}
overcloud_Controller: {}
placement:
children:
overcloud_placement: {}
overcloud_placement:
children:
overcloud_Controller: {}
cinder_scheduler:
children:
overcloud_cinder_scheduler: {}
overcloud_cinder_scheduler:
children:
overcloud_Controller: {}
overcloud_nova_libvirt:
children:
overcloud_Compute: {}
overcloud_ovn_metadata:
children:
overcloud_Compute: {}
overcloud_tuned:
children:
overcloud_Compute: {}
overcloud_Controller: {}
overcloud_chrony:
children:
overcloud_Compute: {}
overcloud_Controller: {}
horizon:
children:
overcloud_horizon: {}
overcloud_horizon:
children:
overcloud_Controller: {}
neutron_api:
children:
overcloud_neutron_api: {}
overcloud_neutron_api:
children:
overcloud_Controller: {}
overcloud_ca_certs:
children:
overcloud_Compute: {}
overcloud_Controller: {}
heat_api_cfn:
children:
overcloud_heat_api_cfn: {}
overcloud_heat_api_cfn:
children:
overcloud_Controller: {}
overcloud_ovn_controller:
children:
overcloud_Compute: {}
overcloud_Controller: {}

View File

@ -0,0 +1,561 @@
{
"Compute": {
"hosts": [
"overcloud-novacompute-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"serial": "1",
"tripleo_role_name": "Compute",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"Controller": {
"hosts": [
"overcloud-controller-0"
],
"vars": {
"ansible_ssh_user": "heat-admin",
"bootstrap_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"serial": "1",
"tripleo_role_name": "Controller",
"tripleo_role_networks": [
"ctlplane",
"external",
"internal_api",
"management",
"storage",
"storage_mgmt",
"tenant"
]
}
},
"Undercloud": {
"hosts": [
"undercloud"
],
"vars": {
"ansible_connection": "local",
"ansible_host": "localhost",
"ansible_python_interpreter": "/usr/bin/python2",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"auth_url": "https://192.168.24.2:13000",
"cacert": "/etc/pki/ca-trust/source/anchors/cm-local-ca.pem",
"os_auth_token": "gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg",
"overcloud_admin_password": "9RDyelRD5PT5Jk6q4efjYG6Es",
"overcloud_horizon_url": "https://10.0.0.5:443/dashboard",
"overcloud_keystone_url": "https://10.0.0.5:13000",
"plan": "overcloud",
"project_name": "admin",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"undercloud_swift_url": "https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763",
"username": "admin"
}
},
"_meta": {
"hostvars": {
"overcloud-controller-0": {
"ansible_host": "192.168.24.12",
"canonical_hostname": "overcloud-controller-0.localdomain",
"ctlplane_hostname": "overcloud-controller-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.12",
"deploy_server_id": "6c1befea-4173-49bd-9507-631cc33f44a2",
"external_hostname": "overcloud-controller-0.external.localdomain",
"external_ip": "10.0.0.10",
"internal_api_hostname": "overcloud-controller-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.199",
"management_ip": "192.168.24.12",
"storage_hostname": "overcloud-controller-0.storage.localdomain",
"storage_ip": "172.16.1.13",
"storage_mgmt_hostname": "overcloud-controller-0.storagemgmt.localdomain",
"storage_mgmt_ip": "172.16.3.89",
"tenant_hostname": "overcloud-controller-0.tenant.localdomain",
"tenant_ip": "172.16.0.167"
},
"overcloud-novacompute-0": {
"ansible_host": "192.168.24.13",
"canonical_hostname": "overcloud-novacompute-0.localdomain",
"ctlplane_hostname": "overcloud-novacompute-0.ctlplane.localdomain",
"ctlplane_ip": "192.168.24.13",
"deploy_server_id": "c5c20c87-60f8-4dc9-a0e8-1f185c4b8a8c",
"external_ip": "192.168.24.13",
"internal_api_hostname": "overcloud-novacompute-0.internalapi.localdomain",
"internal_api_ip": "172.16.2.241",
"management_ip": "192.168.24.13",
"storage_hostname": "overcloud-novacompute-0.storage.localdomain",
"storage_ip": "172.16.1.235",
"storage_mgmt_ip": "192.168.24.13",
"tenant_hostname": "overcloud-novacompute-0.tenant.localdomain",
"tenant_ip": "172.16.0.242"
}
}
},
"allovercloud": {
"children": [
"Compute",
"Controller"
],
"vars": {
"container_cli": "podman",
"ctlplane_vip": "192.168.24.7",
"external_vip": "10.0.0.5",
"internal_api_vip": "172.16.2.164",
"redis_vip": "172.16.2.196",
"storage_mgmt_vip": "172.16.3.44",
"storage_vip": "172.16.1.147"
}
},
"boot_params_service": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ca_certs": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"certmonger_user": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"chrony": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"cinder_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"cinder_scheduler": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"cinder_volume": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"container_image_prepare": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"glance_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"haproxy": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"heat_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"heat_api_cfn": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"heat_api_cloudwatch_disabled": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"heat_engine": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"horizon": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"iscsid": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"keepalived": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"kernel": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"keystone": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"keystone_admin_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"keystone_public_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"logrotate_crond": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"memcached": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"mysql": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"mysql_client": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"neutron_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"neutron_plugin_ml2_ovn": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_api": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_compute": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_conductor": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_libvirt": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_libvirt_guests": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_metadata": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_migration_target": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_scheduler": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"nova_vnc_proxy": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"oslo_messaging_notify": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"oslo_messaging_rpc": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"overcloud": {
"children": [
"allovercloud"
]
},
"ovn_controller": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ovn_dbs": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ovn_metadata": {
"children": [
"Compute"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"placement": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"podman": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"snmp": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"sshd": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"swift_proxy": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"swift_ringbuilder": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"swift_storage": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"timezone": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tripleo_firewall": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tripleo_packages": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"tuned": {
"children": [
"Compute",
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
}
}

View File

@ -0,0 +1,287 @@
Undercloud:
hosts:
undercloud: {}
vars:
ansible_connection: local
ansible_host: localhost
ansible_python_interpreter: /usr/bin/python2
ansible_remote_tmp: /tmp/ansible-${USER}
auth_url: https://192.168.24.2:13000
cacert: /etc/pki/ca-trust/source/anchors/cm-local-ca.pem
os_auth_token: gAAAAABedRLI4L-0UK1i3r0lkHVPFeGE2FB40mk7tjWw_US3nwQvzZlwKPM_uCq1wYeBqkCLwiXW61BrZswCi9M3mI-6HeniTi9qV7nXUyLHrWw1Kh5woAEGPyjmdiMiTh_P0WFKobYqXdP0oFwcN_LWr-mnYE1YWluvX4qKeUEeIOXHVj8OtMg
overcloud_admin_password: 9RDyelRD5PT5Jk6q4efjYG6Es
overcloud_horizon_url: https://10.0.0.5:443/dashboard
overcloud_keystone_url: https://10.0.0.5:13000
plan: overcloud
project_name: admin
undercloud_service_list: [tripleo_nova_compute, tripleo_heat_engine, tripleo_ironic_conductor,
tripleo_swift_container_server, tripleo_swift_object_server, tripleo_mistral_engine]
undercloud_swift_url: https://192.168.24.2:13808/v1/AUTH_b0d47705b94c486889fd2b26ce343763
username: admin
Controller:
hosts:
overcloud-controller-0: {ansible_host: 192.168.24.12, canonical_hostname: overcloud-controller-0.localdomain,
ctlplane_hostname: overcloud-controller-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.12,
deploy_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2, external_hostname: overcloud-controller-0.external.localdomain,
external_ip: 10.0.0.10, internal_api_hostname: overcloud-controller-0.internalapi.localdomain,
internal_api_ip: 172.16.2.199, management_ip: 192.168.24.12, storage_hostname: overcloud-controller-0.storage.localdomain,
storage_ip: 172.16.1.13, storage_mgmt_hostname: overcloud-controller-0.storagemgmt.localdomain,
storage_mgmt_ip: 172.16.3.89, tenant_hostname: overcloud-controller-0.tenant.localdomain,
tenant_ip: 172.16.0.167}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2
serial: '1'
tripleo_role_name: Controller
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
Compute:
hosts:
overcloud-novacompute-0: {ansible_host: 192.168.24.13, canonical_hostname: overcloud-novacompute-0.localdomain,
ctlplane_hostname: overcloud-novacompute-0.ctlplane.localdomain, ctlplane_ip: 192.168.24.13,
deploy_server_id: c5c20c87-60f8-4dc9-a0e8-1f185c4b8a8c, external_ip: 192.168.24.13,
internal_api_hostname: overcloud-novacompute-0.internalapi.localdomain, internal_api_ip: 172.16.2.241,
management_ip: 192.168.24.13, storage_hostname: overcloud-novacompute-0.storage.localdomain,
storage_ip: 172.16.1.235, storage_mgmt_ip: 192.168.24.13, tenant_hostname: overcloud-novacompute-0.tenant.localdomain,
tenant_ip: 172.16.0.242}
vars:
ansible_ssh_user: heat-admin
bootstrap_server_id: 6c1befea-4173-49bd-9507-631cc33f44a2
serial: '1'
tripleo_role_name: Compute
tripleo_role_networks: [ctlplane, external, internal_api, management, storage,
storage_mgmt, tenant]
allovercloud:
children:
Compute: {}
Controller: {}
vars: {container_cli: podman, ctlplane_vip: 192.168.24.7, external_vip: 10.0.0.5,
internal_api_vip: 172.16.2.164, redis_vip: 172.16.2.196, storage_mgmt_vip: 172.16.3.44,
storage_vip: 172.16.1.147}
overcloud:
children:
allovercloud: {}
kernel:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_conductor:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
snmp:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
mysql:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
cinder_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
swift_proxy:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
swift_ringbuilder:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
heat_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
container_image_prepare:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
timezone:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
iscsid:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
boot_params_service:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
heat_api_cloudwatch_disabled:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
tripleo_firewall:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
swift_storage:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
keystone_admin_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
keepalived:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
certmonger_user:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
mysql_client:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
glance_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
keystone:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
cinder_volume:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
ovn_dbs:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
memcached:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
oslo_messaging_rpc:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_vnc_proxy:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
oslo_messaging_notify:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
keystone_public_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_metadata:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
heat_engine:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_migration_target:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
podman:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
tripleo_packages:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_scheduler:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_compute:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
nova_libvirt_guests:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
neutron_plugin_ml2_ovn:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
logrotate_crond:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
haproxy:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
sshd:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
placement:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
cinder_scheduler:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
nova_libvirt:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
ovn_metadata:
children:
Compute: {}
vars: {ansible_ssh_user: heat-admin}
tuned:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
chrony:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
horizon:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
neutron_api:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
ca_certs:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}
heat_api_cfn:
children:
Controller: {}
vars: {ansible_ssh_user: heat-admin}
ovn_controller:
children:
Compute: {}
Controller: {}
vars: {ansible_ssh_user: heat-admin}

View File

@ -21,398 +21,86 @@ from tripleo_common.tests import base
from tripleo_common.inventories import TripleoInventories
class TestInventories(base.TestCase):
class _TestInventoriesBase(base.TestCase):
def setUp(self):
super(TestInventories, self).setUp()
mock_inv_central = MagicMock()
mock_inv_edge0 = MagicMock()
mock_inv_central.list.return_value = self._mock_inv_central_data()
mock_inv_edge0.list.return_value = self._mock_inv_edge0_data()
self.stack_to_inv_obj_map = {
'central': mock_inv_central,
'edge0': mock_inv_edge0
super(_TestInventoriesBase, self).setUp()
self.read_inventory_data()
def read_inventory_data(self):
inventory_data = {}
inventory_dir = os.path.join(
os.path.dirname(__file__), 'inventory_data'
)
for datafile in (
'cell1_dynamic.json',
'cell1_static.yaml',
'overcloud_dynamic.json',
'overcloud_static.yaml',
'merged_dynamic.json',
'merged_static.yaml'
):
name = os.path.basename(datafile).split('.')[0]
path = os.path.join(inventory_dir, datafile)
with open(path, 'r') as data:
inventory_data[name] = yaml.safe_load(data)
self.inventory_data = inventory_data
class TestInventoriesStatic(_TestInventoriesBase):
def setUp(self):
super(TestInventoriesStatic, self).setUp()
mock_inv_overcloud = MagicMock()
mock_inv_cell1 = MagicMock()
mock_inv_overcloud.list.return_value = self.inventory_data[
'overcloud_static'
]
mock_inv_cell1.list.return_value = self.inventory_data[
'cell1_static'
]
stack_to_inv_obj_map = {
'overcloud': mock_inv_overcloud,
'cell1': mock_inv_cell1
}
self.inventories = TripleoInventories(self.stack_to_inv_obj_map)
self.inventories = TripleoInventories(stack_to_inv_obj_map)
def test_merge(self):
self.inventories.merge()
expected = self._mock_inv_merged_data()
for k in expected.keys():
self.assertEqual(expected[k], self.inventories.inventory[k])
actual = dict(self.inventories._merge(dynamic=False))
expected = self.inventory_data['merged_static']
self.assertEqual(expected, actual)
def test_inventory_write_static(self):
self.inventories.merge()
tmp_dir = self.useFixture(fixtures.TempDir()).path
inv_path = os.path.join(tmp_dir, "inventory.yaml")
self.inventories.write_static_inventory(inv_path)
expected = self._mock_inv_merged_data()
expected = self.inventory_data['merged_static']
with open(inv_path, 'r') as f:
loaded_inv = yaml.safe_load(f)
self.assertEqual(expected, loaded_inv)
def _mock_inv_central_data(self):
return {
"Undercloud": {
"hosts": [
"undercloud"
],
"vars": {
"username": "admin",
"overcloud_keystone_url": "http://192.168.24.21:5000",
"project_name": "admin",
"overcloud_horizon_url": "http://192.168.24.21/dashboard",
"auth_url": "https://192.168.24.2:13000",
"ansible_connection": "local",
"cacert": "/etc/pki/ca-trust/cm-local-ca.pem",
"ansible_host": "localhost",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"ansible_python_interpreter": "/usr/bin/python",
"overcloud_admin_password": "7uCCDn4lIKQ4i7ONsPdgX1KbC",
"plan": "central"
}
},
"Controller": {
"hosts": [
"central-controller-0"
],
"vars": {
"tripleo_role_name": "Controller",
"tripleo_role_networks": [
"management",
"storage",
"ctlplane",
"external",
"internal_api",
"storage_mgmt",
"tenant"
],
"serial": "1",
"ansible_ssh_user": "heat-admin",
}
},
"overcloud": {
"children": [
"Controller"
],
"vars": {
"storage_mgmt_vip": "192.168.24.21",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.21",
"redis_vip": "192.168.24.11",
"internal_api_vip": "192.168.24.21",
"external_vip": "192.168.24.21",
"storage_vip": "192.168.24.21"
}
},
"kernel": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ovn_controller": {
"children": [
"Controller"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"_meta": {
"hostvars": {
"central-controller-0": {
"storage_ip": "192.168.24.12",
"storage_mgmt_ip": "192.168.24.12",
"external_ip": "192.168.24.12",
"ctlplane_ip": "192.168.24.12",
"tenant_ip": "192.168.24.12",
"internal_api_ip": "192.168.24.12",
"management_ip": "192.168.24.12",
"ansible_host": "192.168.24.12"
}
}
}
}
def _mock_inv_edge0_data(self):
return {
"Undercloud": {
"hosts": [
"undercloud"
],
"vars": {
"username": "admin",
"overcloud_keystone_url": "http://192.168.24.21:5000",
"project_name": "admin",
"overcloud_horizon_url": "http://192.168.24.21/dashboard",
"auth_url": "https://192.168.24.2:13000",
"ansible_connection": "local",
"cacert": "/etc/pki/ca-trust/cm-local-ca.pem",
"ansible_host": "localhost",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"ansible_python_interpreter": "/usr/bin/python",
"overcloud_admin_password": "7uCCDn4lIKQ4i7ONsPdgX1KbC",
"plan": "edge0"
}
},
"DistributedComputeHCI": {
"hosts": [
"edge0-distributedcomputehci-0"
],
"vars": {
"tripleo_role_name": "DistributedComputeHCI",
"tripleo_role_networks": [
"management",
"storage",
"ctlplane",
"external",
"internal_api",
"storage_mgmt",
"tenant"
],
"serial": "1",
"ansible_ssh_user": "heat-admin",
}
},
"overcloud": {
"children": [
"DistributedComputeHCI"
],
"vars": {
"storage_mgmt_vip": "192.168.24.20",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.20",
"redis_vip": "192.168.24.24",
"internal_api_vip": "192.168.24.20",
"external_vip": "192.168.24.20",
"storage_vip": "192.168.24.20"
}
},
"kernel": {
"children": [
"DistributedComputeHCI"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"ovn_controller": {
"children": [
"DistributedComputeHCI"
],
"vars": {
"ansible_ssh_user": "heat-admin"
}
},
"_meta": {
"hostvars": {
"edge0-distributedcomputehci-0": {
"storage_ip": "192.168.24.13",
"storage_mgmt_ip": "192.168.24.13",
"external_ip": "192.168.24.13",
"ctlplane_ip": "192.168.24.13",
"tenant_ip": "192.168.24.13",
"internal_api_ip": "192.168.24.13",
"management_ip": "192.168.24.13",
"ansible_host": "192.168.24.13"
}
}
class TestInventoriesDynamic(_TestInventoriesBase):
def setUp(self):
super(TestInventoriesDynamic, self).setUp()
mock_inv_overcloud = MagicMock()
mock_inv_cell1 = MagicMock()
mock_inv_overcloud.list.return_value = self.inventory_data[
'overcloud_dynamic'
]
mock_inv_cell1.list.return_value = self.inventory_data[
'cell1_dynamic'
]
stack_to_inv_obj_map = {
'overcloud': mock_inv_overcloud,
'cell1': mock_inv_cell1
}
}
self.inventories = TripleoInventories(stack_to_inv_obj_map)
def _mock_inv_merged_data(self):
return {
"Undercloud": {
"hosts": {
"undercloud": {}
},
"vars": {
"username": "admin",
"overcloud_keystone_url": "http://192.168.24.21:5000",
"project_name": "admin",
"overcloud_horizon_url": "http://192.168.24.21/dashboard",
"auth_url": "https://192.168.24.2:13000",
"ansible_connection": "local",
"cacert": "/etc/pki/ca-trust/cm-local-ca.pem",
"ansible_host": "localhost",
"ansible_remote_tmp": "/tmp/ansible-${USER}",
"undercloud_service_list": [
"tripleo_nova_compute",
"tripleo_heat_engine",
"tripleo_ironic_conductor",
"tripleo_swift_container_server",
"tripleo_swift_object_server",
"tripleo_mistral_engine"
],
"ansible_python_interpreter": "/usr/bin/python",
"overcloud_admin_password": "7uCCDn4lIKQ4i7ONsPdgX1KbC",
"plan": '',
"plans": [
"central",
"edge0"
]
}
},
"central_Controller": {
"hosts": {
"central-controller-0": {
"storage_ip": "192.168.24.12",
"storage_mgmt_ip": "192.168.24.12",
"external_ip": "192.168.24.12",
"ctlplane_ip": "192.168.24.12",
"tenant_ip": "192.168.24.12",
"internal_api_ip": "192.168.24.12",
"management_ip": "192.168.24.12",
"ansible_host": "192.168.24.12"
}
},
"vars": {
"tripleo_role_name": "Controller",
"tripleo_role_networks": [
"management",
"storage",
"ctlplane",
"external",
"internal_api",
"storage_mgmt",
"tenant"
],
"serial": "1",
"ansible_ssh_user": "heat-admin",
}
},
"central_overcloud": {
"vars": {
"storage_mgmt_vip": "192.168.24.21",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.21",
"redis_vip": "192.168.24.11",
"internal_api_vip": "192.168.24.21",
"external_vip": "192.168.24.21",
"storage_vip": "192.168.24.21"
},
"children": {
"central_Controller": {}
}
},
"central": {
"vars": {
"storage_mgmt_vip": "192.168.24.21",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.21",
"redis_vip": "192.168.24.11",
"internal_api_vip": "192.168.24.21",
"external_vip": "192.168.24.21",
"storage_vip": "192.168.24.21"
},
"children": {
"central_Controller": {}
}
},
"central_kernel": {
"vars": {
"ansible_ssh_user": "heat-admin"
},
"children": {
"central_Controller": {}
}
},
"central_ovn_controller": {
"vars": {
"ansible_ssh_user": "heat-admin"
},
"children": {
"central_Controller": {}
}
},
"edge0_DistributedComputeHCI": {
"hosts": {
"edge0-distributedcomputehci-0": {
"storage_ip": "192.168.24.13",
"storage_mgmt_ip": "192.168.24.13",
"external_ip": "192.168.24.13",
"ctlplane_ip": "192.168.24.13",
"tenant_ip": "192.168.24.13",
"internal_api_ip": "192.168.24.13",
"management_ip": "192.168.24.13",
"ansible_host": "192.168.24.13"
}
},
"vars": {
"tripleo_role_name": "DistributedComputeHCI",
"tripleo_role_networks": [
"management",
"storage",
"ctlplane",
"external",
"internal_api",
"storage_mgmt",
"tenant"
],
"serial": "1",
"ansible_ssh_user": "heat-admin",
}
},
"edge0_overcloud": {
"vars": {
"storage_mgmt_vip": "192.168.24.20",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.20",
"redis_vip": "192.168.24.24",
"internal_api_vip": "192.168.24.20",
"external_vip": "192.168.24.20",
"storage_vip": "192.168.24.20"
},
"children": {
"edge0_DistributedComputeHCI": {}
}
},
"edge0": {
"vars": {
"storage_mgmt_vip": "192.168.24.20",
"container_cli": "podman",
"ctlplane_vip": "192.168.24.20",
"redis_vip": "192.168.24.24",
"internal_api_vip": "192.168.24.20",
"external_vip": "192.168.24.20",
"storage_vip": "192.168.24.20"
},
"children": {
"edge0_DistributedComputeHCI": {}
}
},
"edge0_kernel": {
"vars": {
"ansible_ssh_user": "heat-admin"
},
"children": {
"edge0_DistributedComputeHCI": {}
}
},
"edge0_ovn_controller": {
"vars": {
"ansible_ssh_user": "heat-admin"
},
"children": {
"edge0_DistributedComputeHCI": {}
}
}
}
def test_merge(self):
actual = dict(self.inventories._merge())
expected = self.inventory_data['merged_dynamic']
self.assertEqual(expected, actual)
def test_list(self):
actual = self.inventories.list()
expected = self.inventory_data['merged_dynamic']
self.assertEqual(expected, actual)

View File

@ -214,6 +214,9 @@ class TestInventory(base.TestCase):
'tripleo_role_name': 'CustomRole',
'tripleo_role_networks': ['ctlplane']}},
'overcloud': {
'children': ['allovercloud']
},
'allovercloud': {
'children': ['Compute', 'Controller', 'CustomRole'],
'vars': {
'container_cli': 'podman',
@ -302,6 +305,9 @@ class TestInventory(base.TestCase):
'tripleo_role_name': 'CustomRole',
'tripleo_role_networks': ['ctlplane']}},
'overcloud': {
'children': ['allovercloud']
},
'allovercloud': {
'children': ['Compute', 'Controller', 'CustomRole'],
'vars': {
'container_cli': 'podman',
@ -433,12 +439,17 @@ class TestInventory(base.TestCase):
'serial': 1,
'tripleo_role_name': 'CustomRole',
'tripleo_role_networks': ['ctlplane']}},
'overcloud': {'children': {'Compute': {},
'Controller': {},
'CustomRole': {}},
'vars': {'container_cli': 'podman',
'ctlplane_vip': 'x.x.x.4',
'redis_vip': 'x.x.x.6'}},
'overcloud': {
'children': {
'allovercloud': {}
}
},
'allovercloud': {'children': {'Compute': {},
'Controller': {},
'CustomRole': {}},
'vars': {'container_cli': 'podman',
'ctlplane_vip': 'x.x.x.4',
'redis_vip': 'x.x.x.6'}},
'sa': {'children': {'Controller': {}},
'vars': {'ansible_ssh_user': 'heat-admin'}},
'sb': {'children': {'Controller': {}},