From 869d866aa1e5608b5ccbac1ce2a24422f8eeab80 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Fri, 16 Nov 2018 01:35:51 +0100 Subject: [PATCH] display.error on no matching --start-at-task (#45221) --- lib/ansible/executor/playbook_executor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 25020c4a1c0..4ad8214a4ee 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -225,6 +225,13 @@ class PlaybookExecutor: display.display("No issues encountered") return result + if self._options.start_at_task and not self._tqm._start_at_done: + display.error( + "No matching task \"%s\" found. " + "Note: --start-at-task can only follow static includes." + % self._options.start_at_task + ) + return result def _get_serialized_batches(self, play):