{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/20195","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/20195/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/20195/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/20195/events","html_url":"https://github.com/ansible/ansible/issues/20195","id":200474038,"number":20195,"title":"ec2_tag module doesn't support new aws region ca-central-1","user":{"login":"conlon","id":1923044,"avatar_url":"https://avatars.githubusercontent.com/u/1923044?v=3","gravatar_id":"","url":"https://api.github.com/users/conlon","html_url":"https://github.com/conlon","followers_url":"https://api.github.com/users/conlon/followers","following_url":"https://api.github.com/users/conlon/following{/other_user}","gists_url":"https://api.github.com/users/conlon/gists{/gist_id}","starred_url":"https://api.github.com/users/conlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conlon/subscriptions","organizations_url":"https://api.github.com/users/conlon/orgs","repos_url":"https://api.github.com/users/conlon/repos","events_url":"https://api.github.com/users/conlon/events{/privacy}","received_events_url":"https://api.github.com/users/conlon/received_events","type":"User","site_admin":false},"labels":[{"id":437720458,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.0","name":"affects_2.0","color":"5319e7","default":false},{"id":379680333,"url":"https://api.github.com/repos/ansible/ansible/labels/aws","name":"aws","color":"c5def5","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":61528803,"url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-12T20:41:57Z","updated_at":"2017-01-17T23:35:50Z","closed_at":"2017-01-17T23:34:18Z","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nec2_tag module\r\n\r\n##### ANSIBLE VERSION\r\ntested with\r\n```\r\nansible 2.0.2.0\r\n  config file = /Users/mconlon/git/hyperwave_relay_canada/ansible.cfg\r\n  configured module search path = custom_modules\r\n```\r\nand\r\n```\r\nansible 2.3.0 (devel 02b548dba2) last updated 2017/01/12 12:21:15 (GMT -500)\r\n  config file = /Users/mconlon/git/hyperwave_relay_canada/ansible.cfg\r\n  configured module search path = [u'custom_modules']\r\n```\r\n\r\n(I wiped away my boto installation and reinstalled to get the latest version...also reinstalled boto from scratch when testing devel branch of ansible inside virtualenv.)\r\n\r\n##### CONFIGURATION\r\nmy ansible.cfg:\r\n```\r\n[defaults]\r\nroles_path = roles\r\nlookup_plugins = lookup_plugins\r\nfilter_plugins = filter_plugins\r\nhash_behaviour = merge\r\nlibrary = custom_modules\r\nforks = 50\r\n\r\n[ssh_connection]\r\nscp_if_ssh = True\r\npipelining = True\r\n# an attempt to fix ssh unreachable errors when machines are actually reachable\r\nretries = 5\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nRunning from Mac OS X 10.12.2, managing Ubuntu 14.04\r\n\r\n##### SUMMARY\r\nThe ec2_tag module isn't compatible with ca-central-1 region of AWS\r\n\r\n##### STEPS TO REPRODUCE\r\nexample tasks which fail (region has been set in the inventory to \"ca-central-1\"):\r\n```yaml\r\n- name: set role tag\r\n  ec2_tag:\r\n    region: \"{{ region }}\"\r\n    resource: \"{{ ec2_id }}\"\r\n    tags:\r\n      role: \"{{ ec2_role }}\"\r\n```\r\nand\r\n```yaml\r\n- name: check aws Name tag\r\n  ec2_tag:\r\n    region: \"{{ region }}\"\r\n    resource: \"{{ ansible_ec2_instance_id }}\"\r\n    state: list\r\n  register: ec2_tags\r\n```\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\nThe tag should be set on an instance in Canada, or I should be able to get a list of tags on an instance in Canada.\r\n\r\n##### ACTUAL RESULTS\r\nThe module fails because it doesn't recognize ca-central-1\r\n\r\noutput:\r\n```\r\nTASK [bastion : set role tag] ***************************************************************************************************************************************************************\r\ntask path: /Users/mconlon/git/hyperwave_relay_canada/roles/bastion/tasks/main.yml:39\r\nUsing module file /Users/mconlon/ansible_devel/src/ansible/lib/ansible/modules/cloud/amazon/ec2_tag.py\r\n<10.3.1.144> ESTABLISH SSH CONNECTION FOR USER: ubuntu\r\n<10.3.1.144> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=4242 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -o 'ProxyCommand=ssh -W %h:%p bastion-01.edge.aworks.ca' -o ControlPath=/Users/mconlon/.ansible/cp/ansible-ssh-%h-%p-%r 10.3.1.144 '/bin/sh -c '\"'\"'/usr/bin/python && sleep 0'\"'\"''\r\nfatal: [10.3.1.144]: FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"aws_access_key\": null,\r\n            \"aws_secret_key\": null,\r\n            \"ec2_url\": null,\r\n            \"profile\": null,\r\n            \"region\": \"ca-central-1\",\r\n            \"resource\": \"i-0e8fb7c78637b5004\",\r\n            \"security_token\": null,\r\n            \"state\": \"present\",\r\n            \"tags\": {\r\n                \"role\": \"bastion\"\r\n            },\r\n            \"validate_certs\": true\r\n        },\r\n        \"module_name\": \"ec2_tag\"\r\n    },\r\n    \"msg\": \"Region ca-central-1 does not seem to be available for aws module boto.ec2. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/273335947","html_url":"https://github.com/ansible/ansible/issues/20195#issuecomment-273335947","issue_url":"https://api.github.com/repos/ansible/ansible/issues/20195","id":273335947,"user":{"login":"conlon","id":1923044,"avatar_url":"https://avatars.githubusercontent.com/u/1923044?v=3","gravatar_id":"","url":"https://api.github.com/users/conlon","html_url":"https://github.com/conlon","followers_url":"https://api.github.com/users/conlon/followers","following_url":"https://api.github.com/users/conlon/following{/other_user}","gists_url":"https://api.github.com/users/conlon/gists{/gist_id}","starred_url":"https://api.github.com/users/conlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conlon/subscriptions","organizations_url":"https://api.github.com/users/conlon/orgs","repos_url":"https://api.github.com/users/conlon/repos","events_url":"https://api.github.com/users/conlon/events{/privacy}","received_events_url":"https://api.github.com/users/conlon/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T23:35:50Z","updated_at":"2017-01-17T23:35:50Z","body":"using `delegate_to: localhost` on these tasks also seems to work just fine for my purposes, without having to update all my remote hosts"}}
{"actor":{"display_login":"conlon"}}