{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17117","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17117/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17117/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17117/events","html_url":"https://github.com/ansible/ansible/issues/17117","id":171602884,"number":17117,"title":"Do-until loops does not fail after the last iteration when using failed_when","user":{"login":"dhose","id":4066579,"avatar_url":"https://avatars.githubusercontent.com/u/4066579?v=3","gravatar_id":"","url":"https://api.github.com/users/dhose","html_url":"https://github.com/dhose","followers_url":"https://api.github.com/users/dhose/followers","following_url":"https://api.github.com/users/dhose/following{/other_user}","gists_url":"https://api.github.com/users/dhose/gists{/gist_id}","starred_url":"https://api.github.com/users/dhose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhose/subscriptions","organizations_url":"https://api.github.com/users/dhose/orgs","repos_url":"https://api.github.com/users/dhose/repos","events_url":"https://api.github.com/users/dhose/events{/privacy}","received_events_url":"https://api.github.com/users/dhose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T08:33:48Z","updated_at":"2016-08-17T08:33:48Z","closed_at":null,"body":"##### ISSUE TYPE\r\n\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n\r\n```\r\nansible 2.1.1.0\r\n```\r\n\r\n##### CONFIGURATION\r\ndefault\r\n\r\n##### OS / ENVIRONMENT\r\nLinux\r\n\r\n##### SUMMARY\r\nDo-until loops does not fail after the last iteration when using failed_when\r\n\r\n##### EXAMPLE PLAYBOOK 1\r\n\r\n```\r\n---\r\n\r\n- hosts: localhost\r\n  tasks:\r\n    - command: echo \"not started\"\r\n      register: test_result\r\n      until: test_result.stdout == 'finished' or test_result.stdout == 'error'\r\n      retries: 3\r\n      delay: 1\r\n```\r\n\r\n##### OUTPUT\r\n\r\n```\r\nTASK [command] *****************************************************************\r\nFAILED - RETRYING: TASK: command (3 retries left).\r\nFAILED - RETRYING: TASK: command (2 retries left).\r\nFAILED - RETRYING: TASK: command (1 retries left).\r\nfatal: [localhost]: FAILED! => {\"changed\": true, \"cmd\": [\"echo\", \"not started\"], \"delta\": \"0:00:00.001682\", \"end\": \"2016-08-17 10:20:54.328148\", \"failed\": true, \"rc\": 0, \"start\": \"2016-08-17 10:20:54.326466\", \"stderr\": \"\", \"stdout\": \"not started\", \"stdout_lines\": [\"not started\"], \"warnings\": []}\r\n\r\n```\r\n\r\n##### EXAMPLE PLAYBOOK 2\r\n\r\n```\r\n---\r\n- hosts: localhost\r\n  tasks:\r\n    - command: echo \"not started\"\r\n      register: test_result\r\n      until: test_result.stdout == 'finished' or test_result.stdout == 'error'\r\n      failed_when: test_result.stdout == 'error'\r\n      retries: 3\r\n      delay: 1\r\n```\r\n\r\n##### OUTPUT\r\n\r\n```\r\nTASK [command] *****************************************************************\r\nFAILED - RETRYING: TASK: command (3 retries left).\r\nFAILED - RETRYING: TASK: command (2 retries left).\r\nFAILED - RETRYING: TASK: command (1 retries left).\r\nchanged: [localhost]\r\n```\r\n"}}
{"actor":{"display_login":"dhose"}}