{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/19112","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/19112/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/19112/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/19112/events","html_url":"https://github.com/ansible/ansible/issues/19112","id":194689806,"number":19112,"title":"ec2 module: profile option ignored","user":{"login":"maxrothman","id":2607086,"avatar_url":"https://avatars.githubusercontent.com/u/2607086?v=3","gravatar_id":"","url":"https://api.github.com/users/maxrothman","html_url":"https://github.com/maxrothman","followers_url":"https://api.github.com/users/maxrothman/followers","following_url":"https://api.github.com/users/maxrothman/following{/other_user}","gists_url":"https://api.github.com/users/maxrothman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxrothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxrothman/subscriptions","organizations_url":"https://api.github.com/users/maxrothman/orgs","repos_url":"https://api.github.com/users/maxrothman/repos","events_url":"https://api.github.com/users/maxrothman/events{/privacy}","received_events_url":"https://api.github.com/users/maxrothman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-09T20:30:57Z","updated_at":"2016-12-09T20:31:01Z","closed_at":null,"body":"_From @maxrothman on July 9, 2015 20:22_\n\n**Issue Type**: Bug Report\n**Ansible Version**: 1.9\n**Ansible Configuration**: default\n**Environment**: OSX 10.9.5\n**Summary**: The \"profile\" option in the ec2 module is ignored\n\n**Steps To Reproduce**:\nCreate a playbook like so and run it. The account in which `subnet-0000000` exists must not be in your default aws profile (defined in `~/.aws/{credentials,config}`:\n\n```\n- name: Make an instance\n  hosts: all\n  connection: local\n  gather_facts: False\n  tasks:\n    - name: Manage instances\n      ec2:\n        profile: myprofile\n        region: us-east-1\n        wait: yes\n        group_id: sg-000000\n        key_name: mykey\n        vpc_subnet_id: subnet-0000000\n        instance_type: m3.medium\n        instance_tags:\n          Name: my-test\n        image: ami-0000000\n        volumes: \n          - device_name: /dev/sdb\n            ephemeral: ephemeral0\n```\n\n**Expected Results**: An instance is created as specified\n\n**Actual Results**:\nThe following error occurs:\n\n```\nfailed: [localhost] => {\"failed\": true, \"parsed\": false}\nTraceback (most recent call last):\n  File \"/Users/me/.ansible/tmp/ansible-tmp-1436472344.45-200995340429191/ec2\", line 3054, in <module>\n    main()\n  File \"/Users/me/.ansible/tmp/ansible-tmp-1436472344.45-200995340429191/ec2\", line 1246, in main\n    (instance_dict_array, new_instance_ids, changed) = create_instances(module, ec2, vpc)\n  File \"/Users/me/.ansible/tmp/ansible-tmp-1436472344.45-200995340429191/ec2\", line 789, in create_instances\n    vpc_id = vpc.get_all_subnets(subnet_ids=[vpc_subnet_id])[0].vpc_id\n  File \"/Library/Python/2.7/site-packages/boto/vpc/__init__.py\", line 1153, in get_all_subnets\n    return self.get_list('DescribeSubnets', params, [('item', Subnet)])\n  File \"/Library/Python/2.7/site-packages/boto/connection.py\", line 1185, in get_list\n    raise self.ResponseError(response.status, response.reason, body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response><Errors><Error><Code>InvalidSubnetID.NotFound</Code><Message>The subnet ID 'subnet-000000' does not exist</Message></Error></Errors><RequestID>xxxxxxxxxxxxxxxxxx</RequestID></Response>\n```\n\nChanging the profile in which that subnet exists to the default profile allows the playbook to run as expected.\n\n\n_Copied from original issue: ansible/ansible-modules-core#1701_"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/266115474","html_url":"https://github.com/ansible/ansible/issues/19112#issuecomment-266115474","issue_url":"https://api.github.com/repos/ansible/ansible/issues/19112","id":266115474,"user":{"login":"maxrothman","id":2607086,"avatar_url":"https://avatars.githubusercontent.com/u/2607086?v=3","gravatar_id":"","url":"https://api.github.com/users/maxrothman","html_url":"https://github.com/maxrothman","followers_url":"https://api.github.com/users/maxrothman/followers","following_url":"https://api.github.com/users/maxrothman/following{/other_user}","gists_url":"https://api.github.com/users/maxrothman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxrothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxrothman/subscriptions","organizations_url":"https://api.github.com/users/maxrothman/orgs","repos_url":"https://api.github.com/users/maxrothman/repos","events_url":"https://api.github.com/users/maxrothman/events{/privacy}","received_events_url":"https://api.github.com/users/maxrothman/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T20:31:00Z","updated_at":"2016-12-09T20:31:00Z","body":"_From @ansibot on August 28, 2016 15:44_\n\n@ansible, ping. This issue is still waiting on your response.\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n\n<!--- boilerplate: issue_renotify_maintainer --->\n"}}
{"actor":{"display_login":"maxrothman"}}