{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/26425","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/26425/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/26425/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/26425/events","html_url":"https://github.com/ansible/ansible/issues/26425","id":240587096,"number":26425,"title":"Unexpected behaviour with difference filter","user":{"login":"thmshmm","id":19779372,"avatar_url":"https://avatars3.githubusercontent.com/u/19779372?v=3","gravatar_id":"","url":"https://api.github.com/users/thmshmm","html_url":"https://github.com/thmshmm","followers_url":"https://api.github.com/users/thmshmm/followers","following_url":"https://api.github.com/users/thmshmm/following{/other_user}","gists_url":"https://api.github.com/users/thmshmm/gists{/gist_id}","starred_url":"https://api.github.com/users/thmshmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmshmm/subscriptions","organizations_url":"https://api.github.com/users/thmshmm/orgs","repos_url":"https://api.github.com/users/thmshmm/repos","events_url":"https://api.github.com/users/thmshmm/events{/privacy}","received_events_url":"https://api.github.com/users/thmshmm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-05T09:14:38Z","updated_at":"2017-07-05T09:14:38Z","closed_at":null,"body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nAlso test if the latest release, and master branch are affected too.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nFilter: difference\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.3.1.0 (stable-2.3 b5c2f2dc71) last updated 2017/06/16 13:30:23 (GMT +000)\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nMention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\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\nN/A\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nThe \"difference\" filter documentation states that it returns \"items in 1 that don’t exist in 2\". This is true, but if there are two or more equal objects in list 1 the equal items are contained only once in the result list.\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- debug: msg=\"{{ [\"test1\", \"test2\", \"test2\"]|difference([\"test1\"]) }}\"\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\n[\"test2\", \"test2\"]\r\n```\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n[\"test2\"]\r\n```\r\n"}}
{"actor":{"display_login":"thmshmm"}}