{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/29312","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/29312/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/29312/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/29312/events","html_url":"https://github.com/ansible/ansible/issues/29312","id":256552922,"number":29312,"title":"New ecs_service_facts module has a return behavior that is inconsistent when compared to existing *_facts modules.","user":{"login":"ansibot","id":6585283,"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},"labels":[{"id":437720635,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.1","name":"affects_2.1","color":"5319e7","default":false},{"id":379680333,"url":"https://api.github.com/repos/ansible/ansible/labels/aws","name":"aws","color":"c5def5","default":false},{"id":61528803,"url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":852590921,"url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-11T00:26:28Z","updated_at":"2018-03-19T19:22:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"From @pvwichen on 2016-05-16T14:08:49Z\r\n##### ISSUE TYPE\n- Feature Idea\n##### COMPONENT NAME\n\n`/ansible/ansible-modules-extras/cloud/amazon/ecs_service_facts.py`\n##### ANSIBLE VERSION\n\n```\n2.1.0\n```\n##### SUMMARY\n\nNew ecs_service_facts module has a return behavior that is inconsistent when compared to existing *_facts modules.\n\nThe new `ecs_service_facts` module works without issues, but it automatically creates a `services` variable (i.e. by returning with `ecs_facts_result = dict(changed=False, ansible_facts=ecs_facts)`). Since the task/module does support querying specify services, it seemed that it would be better if the module behaved similar to other /cloud/amazon/*_fact modules where they use `register` to capture the output.\n\nWhile the module allows to be queried with a single task, this could cause some confusion if a user executes the task multiple times (i.e. `services` will only contain the result from the last task).\n\nI am willing to create a pull request but there may be reasons for this difference so I want to check prior to spending time on it / creating a breaking change.\n##### STEPS TO REPRODUCE\n\nExecute:\n\n```\n- name: Get the ECS service 1's info\n  ecs_service_facts:\n    region: us-east-1\n    cluster: ecs-cluster-name\n    service: service-name-1\n    details: \"true\"\n\n- debug: var=services\n\n- name: Get the ECS service 2's info\n  ecs_service_facts:\n    region: us-east-1\n    cluster: ecs-cluster-name\n    service: service-name-2\n    details: \"true\"\n\n- debug: var=services\n```\n\nAs expected, `services` will only contain the info for service-name-2.\n\nNotes: \n- no `register` used.\n- can also use `register`, but to access the information, the accessor would be `variable_name.ansible_facts.services`.\n##### EXPECTED RESULTS\n\nExecute:\n\n```\n- name: Get the ECS service 1's info\n  ecs_service_facts:\n    region: us-east-1\n    cluster: ecs-cluster-name\n    service: service-name-1\n    details: \"true\"\n  register: service_1\n\n- debug: var=service_1\n\n- name: Get the ECS service 2's info\n  ecs_service_facts:\n    region: us-east-1\n    cluster: ecs-cluster-name\n    service: service-name-2\n    details: \"true\"\n  register: var=service_2\n\n- debug: var=service_1\n- debug: var=service_2\n```\n\n`service_1` and `service_2` would contain the information for each service.\n\r\nCopied from original issue: ansible/ansible-modules-extras#2239\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/374336666","html_url":"https://github.com/ansible/ansible/issues/29312#issuecomment-374336666","issue_url":"https://api.github.com/repos/ansible/ansible/issues/29312","id":374336666,"user":{"login":"dagoonline","id":238982,"avatar_url":"https://avatars0.githubusercontent.com/u/238982?v=4","gravatar_id":"","url":"https://api.github.com/users/dagoonline","html_url":"https://github.com/dagoonline","followers_url":"https://api.github.com/users/dagoonline/followers","following_url":"https://api.github.com/users/dagoonline/following{/other_user}","gists_url":"https://api.github.com/users/dagoonline/gists{/gist_id}","starred_url":"https://api.github.com/users/dagoonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagoonline/subscriptions","organizations_url":"https://api.github.com/users/dagoonline/orgs","repos_url":"https://api.github.com/users/dagoonline/repos","events_url":"https://api.github.com/users/dagoonline/events{/privacy}","received_events_url":"https://api.github.com/users/dagoonline/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T19:22:02Z","updated_at":"2018-03-19T19:22:02Z","author_association":"NONE","body":"This is still happening in ansible 2.4.3"}}
{"actor":{"display_login":"dagoonline"}}