New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update playbook_executor.py #80594
base: devel
Are you sure you want to change the base?
Update playbook_executor.py #80594
Conversation
Wrong error message is display.
@@ -265,7 +265,7 @@ def run(self): | |||
if context.CLIARGS['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." | |||
" Note: --start-at-task can only follow dynamic includes." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really correct but the current wording is confusing (git blame
'ed to my commit ;-) ).
I believe by "following static includes" it is meant that --start-at-task
can target tasks within static includes.
So the message should be wordsmithed to contain the following information, --start-at-task
:
- can target tasks within static includes
- cannot target tasks within dynamic includes
- can target the dynamic include task itself
- cannot target the static include task itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To explain the above, static includes (imports) are removed and replaced with the imported tasks when compiling the playbook so by the time you get here, they don't exist, but the imported tasks do exist.
On the contrary dynamic includes (include_X) exist at this point and have not been processed yet, so the 'future included tasks' are not accessible but the include itself is.
Wrong error message is display when the ansible-playbook command is lauch with the option option --start-at-task 'yy'
SUMMARY
I tried to import tasks in a play book with the import_tasks:
Here is the content of the file import_tasks.yaml:
ISSUE TYPE
COMPONENT NAME
import_tasks
ADDITIONAL INFORMATION
Create a playbook named p1.yml with a task:
Here is the content of the file import_tasks.yaml:
Run your play book p1.yml with option
--start-at-task 'yy'
as import_tasks is static, the wrong message error below is displayed :