{"id":1855,"date":"2022-03-09T13:50:08","date_gmt":"2022-03-09T12:50:08","guid":{"rendered":"https:\/\/www.netnea.com\/cms\/?p=1855"},"modified":"2022-03-09T13:50:09","modified_gmt":"2022-03-09T12:50:09","slug":"ansible-end_play-vs-end_host","status":"publish","type":"post","link":"https:\/\/www.netnea.com\/cms\/2022\/03\/09\/ansible-end_play-vs-end_host\/","title":{"rendered":"Ansible end_play vs end_host"},"content":{"rendered":"\n<p>If your Ansible playbook needs to be stopped for a single node (host) of your inventory, be sure you do use <code>\"meta: end_host\"<\/code> and not <code>\"meta: end_play\"<\/code>. The later stops the whole script, and can potentially creates a hard-to-debug situation, depending on your parallelism and the order on which nodes are checked during the playbook life.<\/p>\n\n\n\n<p>The exact behavior is <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/ansible\/builtin\/meta_module.html#parameter-free_form\">clear in the doc<\/a>.  One must only read it \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your Ansible playbook needs to be stopped for a single node (host) of your inventory, be sure you do use &#8220;meta: end_host&#8221; and not &#8220;meta: end_play&#8221;. The later stops the whole script, and can potentially creates a hard-to-debug situation, depending on your parallelism and the order on which nodes are checked during the playbook [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[],"class_list":{"0":"post-1855","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ansible","7":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/1855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/comments?post=1855"}],"version-history":[{"count":3,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/1855\/revisions"}],"predecessor-version":[{"id":1858,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/1855\/revisions\/1858"}],"wp:attachment":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/media?parent=1855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/categories?post=1855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/tags?post=1855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}