Now the error :
ansible-inventory --list -i vmware.yml
[WARNING]: * Failed to parse /etc/ansible/playbooks/vmware.yml with ansible_collections.community.vmware.plugins.inventory.vmware_vm_inventory plugin: Unable to find 'vSphere
Automation SDK' Python library which is required. Please refer this URL for installation steps -
https://code.vmware.com/web/sdk/7.0/vsphere-automation-python[WARNING]: Unable to parse /etc/ansible/playbooks/vmware.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
"_meta": {
"hostvars": {}
},
"all": {
"children": [
"ungrouped"
]
}
}
#######################################
tried below 2
scl enable rh-python36 bash
ansible-inventory --list -i vmware.yml
[WARNING]: * Failed to parse /etc/ansible/playbooks/vmware.yml with ansible_collections.community.vmware.plugins.inventory.vmware_vm_inventory plugin: Unable to find 'vSphere
Automation SDK' Python library which is required. Please refer this URL for installation steps -
https://code.vmware.com/web/sdk/7.0/vsphere-automation-python[WARNING]: Unable to parse /etc/ansible/playbooks/vmware.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
"_meta": {
"hostvars": {}
},
"all": {
"children": [
"ungrouped"
]
}
}
#######################################
python --version
Python 3.6.12
ansible --version
ansible 2.9.14
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
OS :-
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core
#######################################
Now i will try what you gave
#######################################
- 'customValue' # <---------------------------------- This way you can specify the customValues
filters:
- OS is defined and OS == 'Linux' # <---------------------------------- This way you can filter customValue
###############################
########
Install was done & was ok when i upgrade to python 3x :
pip install --upgrade pip setuptools
Please suggest ( google did not give any clue for fix )