{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/24138","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/24138/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/24138/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/24138/events","html_url":"https://github.com/ansible/ansible/pull/24138","id":225222847,"number":24138,"title":"vmware_guest: Fix VM creation when adding a network device without a MAC address","user":{"login":"gptech","id":2091669,"avatar_url":"https://avatars2.githubusercontent.com/u/2091669?v=3","gravatar_id":"","url":"https://api.github.com/users/gptech","html_url":"https://github.com/gptech","followers_url":"https://api.github.com/users/gptech/followers","following_url":"https://api.github.com/users/gptech/following{/other_user}","gists_url":"https://api.github.com/users/gptech/gists{/gist_id}","starred_url":"https://api.github.com/users/gptech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gptech/subscriptions","organizations_url":"https://api.github.com/users/gptech/orgs","repos_url":"https://api.github.com/users/gptech/repos","events_url":"https://api.github.com/users/gptech/events{/privacy}","received_events_url":"https://api.github.com/users/gptech/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":48276098,"url":"https://api.github.com/repos/ansible/ansible/labels/bugfix_pull_request","name":"bugfix_pull_request","color":"ded270","default":false},{"id":499635167,"url":"https://api.github.com/repos/ansible/ansible/labels/c:module_utils/","name":"c:module_utils/","color":"b60205","default":false},{"id":61528803,"url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-29T00:53:19Z","updated_at":"2017-04-29T00:56:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/24138","html_url":"https://github.com/ansible/ansible/pull/24138","diff_url":"https://github.com/ansible/ansible/pull/24138.diff","patch_url":"https://github.com/ansible/ansible/pull/24138.patch"},"body":"##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\ncreate_nic() sets the nic's address type as 'assigned', which requires you to supply a MAC address. This causes an error when omitting the MAC address from a playbook. \r\n\r\nThis patch will set the address type to 'generated' if a MAC address is not specified.\r\n<!---\r\nIf you are fixing an existing issue, please include \"Fixes #nnn\" in your\r\ncommit message and your description; but you should still explain what\r\nthe change does.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bugfix Pull Request\r\n\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module/plugin/module/task -->\r\nvmware_guest\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\ndevel\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!---\r\nInclude additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful.\r\n  -->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\nExample Playbook: \r\n```\r\n---\r\n- hosts: test-vms\r\n  gather_facts: false\r\n  connection: local\r\n  vars_prompt:\r\n    - name: \"esxi_user\"\r\n      prompt: \"Enter ESXi username\"\r\n      private: no\r\n    - name: \"esxi_pass\"\r\n      prompt: \"Enter ESXi password\"\r\n      private: yes\r\n  vars:\r\n    datacenter: 'ha-datacenter'\r\n    notes: 'Created by Ansible'\r\n  tasks:\r\n    - name: \"Deploy VM\"\r\n      vmware_guest:\r\n        name: \"{{ inventory_hostname }}\"\r\n        validate_certs: False\r\n        hostname: \"{{ esxi_hostname }}\"\r\n        username: \"{{ esxi_user }}\"\r\n        password: \"{{ esxi_pass }}\"\r\n        state: present\r\n        guest_id: \"{{ osid }}\"\r\n        disk:\r\n        - size_gb: \"{{ disk_size }}\"\r\n          type: thin\r\n          datastore: \"{{ datastore }}\"\r\n        hardware:\r\n          memory_mb: \"{{ memory }}\"\r\n          num_cpus: \"{{ cpucount }}\"\r\n        networks:\r\n        - name: VM Network\r\n      delegate_to: localhost\r\n```\r\nError: \r\n```\r\nfatal: [test-vm01 -> localhost]: FAILED! => {\r\n    \"changed\": true,\r\n    \"failed\": true,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"annotation\": null,\r\n            \"cluster\": null,\r\n            \"customization\": {},\r\n            \"customvalues\": [],\r\n            \"datacenter\": \"ha-datacenter\",\r\n            \"disk\": [\r\n                {\r\n                    \"datastore\": \"datastore1\",\r\n                    \"size_gb\": 10,\r\n                    \"type\": \"thin\"\r\n                }\r\n            ],\r\n            \"esxi_hostname\": null,\r\n            \"folder\": \"/vm\",\r\n            \"force\": false,\r\n            \"guest_id\": \"centos64Guest\",\r\n            \"hardware\": {\r\n                \"memory_mb\": 512,\r\n                \"num_cpus\": 1\r\n            },\r\n            \"hostname\": \"1.1.1.1\",\r\n            \"is_template\": false,\r\n            \"name\": \"test-vm01\",\r\n            \"name_match\": \"first\",\r\n            \"networks\": [\r\n                {\r\n                    \"name\": \"VM Network\"\r\n                }\r\n            ],\r\n            \"password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\",\r\n            \"resource_pool\": null,\r\n            \"state\": \"present\",\r\n            \"template_src\": null,\r\n            \"username\": \"root\",\r\n            \"uuid\": null,\r\n            \"validate_certs\": false,\r\n            \"wait_for_ip_address\": false\r\n        }\r\n    },\r\n    \"msg\": \"Invalid configuration for device '2'.\"\r\n}\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/298136642","html_url":"https://github.com/ansible/ansible/pull/24138#issuecomment-298136642","issue_url":"https://api.github.com/repos/ansible/ansible/issues/24138","id":298136642,"user":{"login":"ansibot","id":6585283,"avatar_url":"https://avatars3.githubusercontent.com/u/6585283?v=3","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":"2017-04-29T00:56:10Z","updated_at":"2017-04-29T00:56:10Z","body":"cc @jctanner @nerzhul @dav1x\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: notify --->"}}
{"actor":{"display_login":"ansibot"}}