mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
bump collection requirements, vmware patches
New VMWare and azure were released, pick those up Enable using of VMWare inventory plugin for Ansible 2.9 Few fixes from manual testing with VMWare Remove invalid properties which resulted in no hosts imported Add some defaults to be more consistent with script
This commit is contained in:
parent
c0e07198cf
commit
8bbd2c7aaa
@ -2251,7 +2251,7 @@ class gce(PluginFileInjector):
|
||||
|
||||
class vmware(PluginFileInjector):
|
||||
plugin_name = 'vmware_vm_inventory'
|
||||
# initial_version = '2.9' # Ready 4/22/2020, waiting for release
|
||||
initial_version = '2.9'
|
||||
ini_env_reference = 'VMWARE_INI_PATH'
|
||||
base_injector = 'managed'
|
||||
namespace = 'community'
|
||||
@ -2268,9 +2268,6 @@ class vmware(PluginFileInjector):
|
||||
# Documentation of props, see
|
||||
# https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.rst
|
||||
UPPERCASE_PROPS = [
|
||||
"ansible_ssh_host",
|
||||
"ansible_host",
|
||||
"ansible_uuid",
|
||||
"availableField",
|
||||
"configIssue",
|
||||
"configStatus",
|
||||
@ -2343,16 +2340,26 @@ class vmware(PluginFileInjector):
|
||||
if not striped_hf:
|
||||
continue
|
||||
ret['filters'].append(striped_hf)
|
||||
else:
|
||||
# default behavior filters by power state
|
||||
ret['filters'] = ['runtime.powerState == "poweredOn"']
|
||||
|
||||
groupby_patterns = vmware_opts.get('groupby_patterns')
|
||||
ret.setdefault('keyed_groups', [])
|
||||
if groupby_patterns:
|
||||
ret.setdefault('keyed_groups', [])
|
||||
for pattern in groupby_patterns.split(','):
|
||||
stripped_pattern = pattern.replace('{', '').replace('}', '').strip() # make best effort
|
||||
ret['keyed_groups'].append({
|
||||
'prefix': '', 'separator': '',
|
||||
'key': stripped_pattern
|
||||
})
|
||||
else:
|
||||
# default groups from script
|
||||
for entry in ('guest.guestId', '"templates" if config.template else "guests"'):
|
||||
ret['keyed_groups'].append({
|
||||
'prefix': '', 'separator': '',
|
||||
'key': entry
|
||||
})
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
@ -25,9 +25,6 @@ keyed_groups:
|
||||
separator: ''
|
||||
plugin: community.vmware.vmware_vm_inventory
|
||||
properties:
|
||||
- ansible_ssh_host
|
||||
- ansible_host
|
||||
- ansible_uuid
|
||||
- availableField
|
||||
- configIssue
|
||||
- configStatus
|
||||
|
||||
@ -3,7 +3,7 @@ collections:
|
||||
- name: awx.awx
|
||||
version: 9.3.0
|
||||
- name: azure.azcollection
|
||||
version: 0.1.1 # questionable https://github.com/ansible-collections/azure/issues/55
|
||||
version: 0.1.2
|
||||
- name: amazon.aws
|
||||
version: 0.1.1 # version 0.1.0 seems to have gone missing
|
||||
- name: theforeman.foreman
|
||||
@ -13,6 +13,6 @@ collections:
|
||||
- name: openstack.cloud
|
||||
version: 0.0.1-dev85 # earlier had checksum mismatch
|
||||
- name: community.vmware
|
||||
version: 0.3.1-dev1
|
||||
version: 0.4.0 # first to contain necessary grouping and filtering features
|
||||
- name: ovirt.ovirt_collection
|
||||
version: 1.0.1 # new fix published, should be good to go
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user