Skip to content
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

Merged
merged 1 commit into from Sep 14, 2022

Conversation

oraNod
Copy link
Collaborator

@oraNod oraNod commented Sep 13, 2022

Add MD docs for the fqcn-builtins rule.

hosts: all
tasks:
- name: Shell
ansible.builtin.shell: echo # <- This uses the FQCN for the shell module.
Copy link
Member

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

Copy link
Collaborator Author

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:

Do you think this might need an update based on Brian's comment as well? Thanks.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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

@ssbarnea ssbarnea changed the title Docs: fqcn builtins rule fqcn-builtins: add documentation Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants