VMware Inventory Sync Configuration

Not really a question/issue, but instead wanted to just knowledge share some information to those that might have a VMware shop, and are digging for answers on configuring this.

Below are the instructions on how to setup VMware inventory sync on a schedule, provide for VMware Tag support, only sync powered-on VM’s, and configuring for “pretty names”. For the filters of only showing powered-on VM’s and pretty names, you will find that in the attached images as well.

FYI, we are running 17.0.1 as of this posting.

VMware Inventory Sync Scheduling

  1. Click on Inventories and then your VMware smart inventory

  2. Click on “sources” tab

  3. Click on your VMware source that you wish to schedule

  4. Click on the Schedules tab and click add - configure as desired
    VMware Tag Sync

Get Container ID of awx_task

docker exec | Docker Docs

  • name: find awx_task container
    command: docker ps -aqf “name=awx_task”
    register: containerid

Install VMware sdk into awx_task container

vsphere-automation-sdk = provides for VMware tag sync when “with_tags = true” set on inventory sync

  • name: install vmware sdk support
    command: docker exec -d {{ containerid.stdout }} /var/lib/awx/venv/ansible/bin/pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git

Go to your VMware inventory source > Click “Edit” > Add “with_tags: true” to bottom of VMware source.

Now whenever VMware inventory syncs occur, they will bring along the VMware tags. In our case, we leverage the VMware tags for building AWX smart inventories to apply Linux updates on a schedule configured in an AWX template (among other things)

Let me know if there are any questions. Thanks!

(attachments)