{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16408","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16408/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16408/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16408/events","html_url":"https://github.com/ansible/ansible/issues/16408","id":161869414,"number":16408,"title":"until loop never fails when retries set to 1","user":{"login":"ansafonov","id":10225187,"avatar_url":"https://avatars.githubusercontent.com/u/10225187?v=3","gravatar_id":"","url":"https://api.github.com/users/ansafonov","html_url":"https://github.com/ansafonov","followers_url":"https://api.github.com/users/ansafonov/followers","following_url":"https://api.github.com/users/ansafonov/following{/other_user}","gists_url":"https://api.github.com/users/ansafonov/gists{/gist_id}","starred_url":"https://api.github.com/users/ansafonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansafonov/subscriptions","organizations_url":"https://api.github.com/users/ansafonov/orgs","repos_url":"https://api.github.com/users/ansafonov/repos","events_url":"https://api.github.com/users/ansafonov/events{/privacy}","received_events_url":"https://api.github.com/users/ansafonov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P2","name":"P2","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/8","html_url":"https://github.com/ansible/ansible/milestones/2.2.0","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/8/labels","id":1702615,"number":8,"title":"2.2.0","description":"","creator":{"login":"sivel","id":39340,"avatar_url":"https://avatars.githubusercontent.com/u/39340?v=3","gravatar_id":"","url":"https://api.github.com/users/sivel","html_url":"https://github.com/sivel","followers_url":"https://api.github.com/users/sivel/followers","following_url":"https://api.github.com/users/sivel/following{/other_user}","gists_url":"https://api.github.com/users/sivel/gists{/gist_id}","starred_url":"https://api.github.com/users/sivel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivel/subscriptions","organizations_url":"https://api.github.com/users/sivel/orgs","repos_url":"https://api.github.com/users/sivel/repos","events_url":"https://api.github.com/users/sivel/events{/privacy}","received_events_url":"https://api.github.com/users/sivel/received_events","type":"User","site_admin":false},"open_issues":163,"closed_issues":269,"state":"open","created_at":"2016-04-12T23:10:49Z","updated_at":"2016-09-27T21:30:23Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-06-23T08:41:45Z","updated_at":"2016-09-28T02:42:30Z","closed_at":"2016-06-23T23:08:22Z","body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.2.0\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nCentOS Linux release 7.2.1511 (Core)\r\n-->\r\n\r\n##### SUMMARY\r\nuntil loop never fails when retries set to 1\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem.\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```\r\ncat playbooks/1\r\n- name: test until\r\n  hosts: localhost\r\n  tasks:\r\n    - name: checking output\r\n      debug: msg='testing'\r\n      until: false\r\n      retries: 1\r\n\r\ncat playbooks/2\r\n- name: test until\r\n  hosts: localhost\r\n  tasks:\r\n    - name: checking output\r\n      debug: msg='testing'\r\n      until: false\r\n      retries: 2\r\n\r\nansible-playbook playbooks/1\r\nansible-playbook playbooks/2\r\n```\r\n##### EXPECTED RESULTS\r\nansible runs command once and fails with an error\r\n \r\n##### ACTUAL RESULTS\r\nansible succeeds silently \r\n\r\n```\r\nansible-playbook playbooks/1\r\n\r\nPLAY [test until] **************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [localhost]\r\n\r\nTASK [checking output] *********************************************************\r\nok: [localhost] => {\r\n    \"msg\": \"testing\"\r\n}\r\n\r\nPLAY RECAP *********************************************************************\r\nlocalhost                  : ok=2    changed=0    unreachable=0    failed=0\r\n\r\nansible-playbook playbooks/2\r\n\r\nPLAY [test until] **************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [localhost]\r\n\r\nTASK [checking output] *********************************************************\r\nFAILED - RETRYING: TASK: checking output (1 retries left).Result was: {\r\n    \"attempts\": 1,\r\n    \"msg\": \"testing\",\r\n    \"retries\": 2\r\n}\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"msg\": \"testing\"\r\n}\r\n\r\nNO MORE HOSTS LEFT *************************************************************\r\n\tto retry, use: --limit @playbooks/2.retry\r\n\r\nPLAY RECAP *********************************************************************\r\nlocalhost                  : ok=1    changed=0    unreachable=0    failed=1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/250057315","html_url":"https://github.com/ansible/ansible/issues/16408#issuecomment-250057315","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16408","id":250057315,"user":{"login":"Arvon2014","id":13073660,"avatar_url":"https://avatars.githubusercontent.com/u/13073660?v=3","gravatar_id":"","url":"https://api.github.com/users/Arvon2014","html_url":"https://github.com/Arvon2014","followers_url":"https://api.github.com/users/Arvon2014/followers","following_url":"https://api.github.com/users/Arvon2014/following{/other_user}","gists_url":"https://api.github.com/users/Arvon2014/gists{/gist_id}","starred_url":"https://api.github.com/users/Arvon2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arvon2014/subscriptions","organizations_url":"https://api.github.com/users/Arvon2014/orgs","repos_url":"https://api.github.com/users/Arvon2014/repos","events_url":"https://api.github.com/users/Arvon2014/events{/privacy}","received_events_url":"https://api.github.com/users/Arvon2014/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T02:42:30Z","updated_at":"2016-09-28T02:42:30Z","body":"NO MORE HOSTS LEFT *************************************************************\r\n\tto retry, use: --limit @playbooks/ssy/dbservers/dbservers.retry\r\n\r\nPLAY RECAP *********************************************************************\r\nssy-db1                    : ok=5    changed=1    unreachable=0    failed=1   \r\nssy-db2                    : ok=5    changed=1    unreachable=0    failed=1   \r\n\r\n[root@ssy-thrift1 ops-repo]# ansible --version\r\nansible 2.1.1.0\r\n  config file = /data/ps/ops-repo/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n\r\n----\r\nThis is V2.1.1.0 always have the problem"}}
{"actor":{"display_login":"Arvon2014"}}