{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/46484","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/46484/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/46484/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/46484/events","html_url":"https://github.com/ansible/ansible/issues/46484","id":366828992,"node_id":"MDU6SXNzdWUzNjY4Mjg5OTI=","number":46484,"title":"Add excitant TAG to vmware VM","user":{"login":"HammerZ3it","id":12964578,"node_id":"MDQ6VXNlcjEyOTY0NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/12964578?v=4","gravatar_id":"","url":"https://api.github.com/users/HammerZ3it","html_url":"https://github.com/HammerZ3it","followers_url":"https://api.github.com/users/HammerZ3it/followers","following_url":"https://api.github.com/users/HammerZ3it/following{/other_user}","gists_url":"https://api.github.com/users/HammerZ3it/gists{/gist_id}","starred_url":"https://api.github.com/users/HammerZ3it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HammerZ3it/subscriptions","organizations_url":"https://api.github.com/users/HammerZ3it/orgs","repos_url":"https://api.github.com/users/HammerZ3it/repos","events_url":"https://api.github.com/users/HammerZ3it/events{/privacy}","received_events_url":"https://api.github.com/users/HammerZ3it/received_events","type":"User","site_admin":false},"labels":[{"id":1043397454,"node_id":"MDU6TGFiZWwxMDQzMzk3NDU0","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.8","name":"affects_2.8","color":"ededed","default":false},{"id":61528803,"node_id":"MDU6TGFiZWw2MTUyODgwMw==","url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":814251818,"node_id":"MDU6TGFiZWw4MTQyNTE4MTg=","url":"https://api.github.com/repos/ansible/ansible/labels/has_pr","name":"has_pr","color":"1d76db","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false},{"id":427121291,"node_id":"MDU6TGFiZWw0MjcxMjEyOTE=","url":"https://api.github.com/repos/ansible/ansible/labels/vmware","name":"vmware","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"Akasurde","id":633765,"node_id":"MDQ6VXNlcjYzMzc2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/633765?v=4","gravatar_id":"","url":"https://api.github.com/users/Akasurde","html_url":"https://github.com/Akasurde","followers_url":"https://api.github.com/users/Akasurde/followers","following_url":"https://api.github.com/users/Akasurde/following{/other_user}","gists_url":"https://api.github.com/users/Akasurde/gists{/gist_id}","starred_url":"https://api.github.com/users/Akasurde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akasurde/subscriptions","organizations_url":"https://api.github.com/users/Akasurde/orgs","repos_url":"https://api.github.com/users/Akasurde/repos","events_url":"https://api.github.com/users/Akasurde/events{/privacy}","received_events_url":"https://api.github.com/users/Akasurde/received_events","type":"User","site_admin":false},"assignees":[{"login":"Akasurde","id":633765,"node_id":"MDQ6VXNlcjYzMzc2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/633765?v=4","gravatar_id":"","url":"https://api.github.com/users/Akasurde","html_url":"https://github.com/Akasurde","followers_url":"https://api.github.com/users/Akasurde/followers","following_url":"https://api.github.com/users/Akasurde/following{/other_user}","gists_url":"https://api.github.com/users/Akasurde/gists{/gist_id}","starred_url":"https://api.github.com/users/Akasurde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akasurde/subscriptions","organizations_url":"https://api.github.com/users/Akasurde/orgs","repos_url":"https://api.github.com/users/Akasurde/repos","events_url":"https://api.github.com/users/Akasurde/events{/privacy}","received_events_url":"https://api.github.com/users/Akasurde/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2018-10-04T14:51:30Z","updated_at":"2018-11-26T15:23:19Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\nHi everyone,\r\nI 'd like to have the ability to assign tags to Virtual machine in VMWARE.\r\nI already found some issues about this subject here about TAGS but none (or I did not found it) is talking about actually affecting TAG(s) to a VM.\r\nWhat I'm trying to do is affect already excitant tags to a VM that I created with ansible module (sphere_guest), the tag allow our backup solution to either do a backup or skip it depending the tag affected to the vm.\r\nI have notice the module : vmware_tag but as far as I understand it and from the parameter it only helps to create / delete / update Vmware Tags.\r\n\r\n##### ISSUE TYPE\r\nAdd the possibility to assign tag(s) to a virtual machine  with supplying a vm_name and a tag_name (or tag id) create it if it does no exist but mainly affect it to the vm.\r\n\r\n##### COMPONENT NAME\r\n`vmware_tag.py`\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\nMight be an idea to add this feature to the module vmware_tag.\r\n\r\nplaybook example :\r\n```\r\n- hosts: localhost\r\n  gather_facts: false\r\n  connection: local\r\n  vars:\r\n    vm_name: \"xxxxxxx\"\r\n    vcenter_hostname: \"xxx.xxx.xxx.xxx\" (or fqdn)\r\n    vcenter_username: \"xxxxxxx@vsphere.local\"\r\n    vcenter_password: \"xxxxxxxxxxx\"\r\n    tag_name: \"tag_number1\"\r\n\r\n  tasks:\r\n  - name: Get facts about tags\r\n    vmware_tag_facts:\r\n      hostname: \"{{ vcenter_hostname }}\"\r\n      username: \"{{ vcenter_username }}\"\r\n      password: \"{{ vcenter_password }}\"\r\n    register: excitant_tags\r\n\r\n  - name: Set the id of the excitant tag by its name\r\n    set_fact:\r\n      tag2assign: \"{{ item.value.tag_id }}\"\r\n    when: item.key == tag_name\r\n    with_dict: \"{{ excitant_tags.tag_facts }}\"\r\n\r\n  - name: Assign tag to VM\r\n    the_desired_module:\r\n       vm_name: {{ vm_name }}\r\n       tag_id: {{ tag2assign }}\r\n\r\n```\r\n\r\n##### EXPECTED RESULTS :\r\nAssign tag the to vm.\r\n\r\n\r\n##### ACTUAL RESULTS\r\nNo actually available.\r\n\r\n##### ADDITIONAL INFOS\r\nansible version : 2.6.0"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/441677056","html_url":"https://github.com/ansible/ansible/issues/46484#issuecomment-441677056","issue_url":"https://api.github.com/repos/ansible/ansible/issues/46484","id":441677056,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTY3NzA1Ng==","user":{"login":"ansibot","id":6585283,"node_id":"MDQ6VXNlcjY1ODUyODM=","avatar_url":"https://avatars0.githubusercontent.com/u/6585283?v=4","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T15:23:19Z","updated_at":"2018-11-26T15:23:19Z","author_association":"CONTRIBUTOR","body":"cc @ckotte\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: notify --->"}}
{"actor":{"display_login":"ansibot"}}