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
fqcn-builtins: add documentation #2412
Conversation
hosts: all | ||
tasks: | ||
- name: Shell | ||
ansible.builtin.shell: echo # <- This uses the FQCN for the shell module. |
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 changes the meaning, to preserve the same meaning it would have to be ansible.legacy.shell
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.
Thanks for spotting that @bcoca
I'm going to update the examples here to use one of the ansible.builtin
modules. I could be wrong in my thinking but it seems like we wouldn't want users to go with the ansible.legacy.shell
module so putting it in the "Correct Code" example might not be the right thing to do.
@ssbarnea I actually got this from the test at:
- hosts: localhost |
Do you think this might need an update based on Brian's comment as well? Thanks.
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.
the difference between legacy and builtin is subtle and most users won't care, but the ones that do ... will find themselves with an unexpected change in behavior. legacy allows local overrides while builtin does not, most people don't have local overrides, but those that do, depend on them.
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.
@bcoca Any documentation links pointing to difference between the two that we can include in this markdown file?
In the end we just give an example of "modernizing" the code, that does not mean that the right answer is always appending "ansible.builtins." prefix. Still, adding an extra note/link regarding the nuances could only be seen as beneficial, convincing user to make a more informed decision.
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.
:-( no, cannot find it ever making the docs
Add MD docs for the fqcn-builtins rule.