{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/38787","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/38787/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/38787/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/38787/events","html_url":"https://github.com/ansible/ansible/issues/38787","id":314409782,"number":38787,"title":"azure_rm_resourcegroup idempotency broke when specifying location","user":{"login":"tijmenvandenbrink","id":2094341,"avatar_url":"https://avatars0.githubusercontent.com/u/2094341?v=4","gravatar_id":"","url":"https://api.github.com/users/tijmenvandenbrink","html_url":"https://github.com/tijmenvandenbrink","followers_url":"https://api.github.com/users/tijmenvandenbrink/followers","following_url":"https://api.github.com/users/tijmenvandenbrink/following{/other_user}","gists_url":"https://api.github.com/users/tijmenvandenbrink/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenvandenbrink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenvandenbrink/subscriptions","organizations_url":"https://api.github.com/users/tijmenvandenbrink/orgs","repos_url":"https://api.github.com/users/tijmenvandenbrink/repos","events_url":"https://api.github.com/users/tijmenvandenbrink/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenvandenbrink/received_events","type":"User","site_admin":false},"labels":[{"id":686214011,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":379680468,"url":"https://api.github.com/repos/ansible/ansible/labels/azure","name":"azure","color":"c5def5","default":false},{"id":785271699,"url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":61528803,"url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":182907838,"url":"https://api.github.com/repos/ansible/ansible/labels/easyfix","name":"easyfix","color":"d4c5f9","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":669975544,"url":"https://api.github.com/repos/ansible/ansible/labels/support:certified","name":"support:certified","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-15T12:05:28Z","updated_at":"2018-05-14T03:46:46Z","closed_at":"2018-05-14T03:46:46Z","author_association":"NONE","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!---\r\nInsert below this comment the name of the module, plugin, task or feature.\r\nDo not include extra details here, e.g. \"vyos_command\" not \"the network module vyos_command\" or the full path\r\n-->\r\nazure_rm_resourcegroup\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.5.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/home/tijmen/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\r\n`\r\nDEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = [u'/home/tijmen/ansible/roles']\r\n`\r\n##### OS / ENVIRONMENT\r\n<!---\r\nMention the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.\r\n-->\r\n`\r\nAnsible control node: \"16.04.4 LTS (Xenial Xerus)\"\r\nTrying to create/update resource_group in Azure\r\n`\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nWhen running the below task it will create the resource group. However, when you run it again it will fail because the location will now be \"westeurope\". \r\n\r\n```yaml\r\n- name: Create a resource group\r\n  azure_rm_resourcegroup:\r\n    name: SomeResourceGroup\r\n    location: \"West Europe\"\r\n    state: present\r\n```\r\nFailure message:\r\n\r\n```\r\nTASK [azure-vm : Create a resource group] ***********************************************************************************************************************************\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"Resource group 'SomeResourceGroup' already exists in location 'westeurope' and cannot be moved.\"}\r\n```\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used.\r\n-->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n- name: Create a resource group\r\n  azure_rm_resourcegroup:\r\n    name: SomeResourceGroup\r\n    location: \"West Europe\"\r\n    state: present\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\n\r\nI'd expect that if \"West Europe\" is a valid value for creating a resource group in West Europe idempotence will not break. \r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nThe playbook fails\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nTASK [azure-vm : Create a resource group] ***********************************************************************************************************************************\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"Resource group 'SomeResourceGroup' already exists in location 'westeurope' and cannot be moved.\"}\r\n```\r\n"}}
{"actor":{"display_login":"zikalino"}}