# Create multiple vmware\_ tags

**URL:** <https://forum.ansible.com/t/create-multiple-vmware-tags/30604>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [June 19, 2019, 4:01pm UTC](https://forum.ansible.com/t/create-multiple-vmware-tags/30604 "2019-06-19T16:01:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeDOC\_CODEL](https://avatars.discourse-cdn.com/v4/letter/l/c57346/32.png) [@LeDOC\_CODEL](https://forum.ansible.com/u/LeDOC_CODEL)\
**Post date:** [June 19, 2019, 4:01pm UTC](https://forum.ansible.com/t/create-multiple-vmware-tags/30604/1 "2019-06-19T16:01:56Z")

</div>

Hello everyone,

I would like to show you a case I don’t understand.  
I want create multiple vmware tags on vSphere with vmware\_tag module. Tag list is based on my Inventory

I have 2 use case:

- First case working:

```auto
---
- name: Gather Facts
  hosts: localhost
  gather_facts: no

  tasks:
  - name: Create tags to APP
    vmware_tag:
      hostname: 'vsrv-vc-app'
      username: '***'
      password: '***'
      validate_certs: false
      category_id: 'urn:vmomi:InventoryServiceCategory:2c4b269b-6414-47b5-848b-c5812ddf6d24:GLOBAL'
      tag_name: '{{ item }}'
      tag_description: '** {{ item }} via ANSIBLE - TEST'
      state: present
    delegate_to: localhost
    with_items:
      - test1 IB
      - test2 IB
      - test3 IB
      - test4 IB

```

- Second one (don’t work), And I don’t understand why:

**_Inventory_**

```auto
[veeam]
serverA tag_save="test1 IB"
serverB tag_save="test2 IB"
serverC tag_save="test3 IB"
serverD tag_save="test4 IB"

```

**_Playbook_**

```auto
---
- name: Gather Facts
  hosts: veeam
  gather_facts: no

  tasks:
  - name: Create tags to APP
    vmware_tag:
      hostname: 'vsrv-vc-app'
      username: ' ****'
      password: ' ****'
      validate_certs: false
      category_id: 'urn:vmomi:InventoryServiceCategory:2c4b269b-6414-47b5-848b-c5812ddf6d24:GLOBAL'
      tag_name: '{{ tag_save }}'
      tag_description: '** {{ tag_save }} via ANSIBLE - TEST'
      state: present
    delegate_to: localhost

```

Anyone could test this 2 case with your vmware server ? I need to know If it’s a real bug, a Wrong syntax or something else ? 🙂  
Thanks a lot
