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

Ansible core added a new field, cli for a single plugin. #277

Merged

Conversation

abadger
Copy link
Contributor

@abadger abadger commented May 26, 2021

Ansible core added a new field, cli to plugin documentation here:
ansible/ansible#73708

Ansible core added a new field, cli to plugin documentation here:
ansible/ansible#73708
@abadger
Copy link
Contributor Author

abadger commented May 26, 2021

This should fix: ansible/ansible#74838

* Add the empty cli field to all of the results for plugins being tested.
* Add the ssh connection ansible-doc output and normalized output for a
  new test which makes sure that having a cli field in the input results
  in the correct output.
* Add some documentation in comments on how to generate the input and
  output of the schema functional tests.
@felixfontein felixfontein merged commit 037d030 into ansible-community:main May 27, 2021
@felixfontein
Copy link
Collaborator

@abadger thanks for implementing this!

@abadger
Copy link
Contributor Author

abadger commented May 27, 2021

I've looked into the information in the cli field and I don't think that it's usable for documentation. The only thing it contains is the name of an internal variable so it has no meaning to outside users. This is different than all of the other similar fields (vars, env, ini) which specify things that are recognizable to the user and then the config subsystem has to decide how to map those to the backends which it gathers information from.

I'd almost say we need to propose a cliv2: field which makes this actually usable but afaics, this is only currently applicable to the ssh plugin and in any expansion, it could only be applicable to ansible-core plugins (because it doesn't allow the plugin to specify new command line args that ansible and ansible-playbook will then know about so a collection won't be able to use it.)

Between the latter and that the '--extra-vars' command line arg already exists for ansible and ansible-core (which lets users feed something specified on the command line to a plugin's vars: entry), this may not have even been a good feature to add. It may have been better for the ssh plugin to merge the information from config and the parsed command line args itself.

@abadger abadger deleted the fix-ansible-core-adding-new-fields branch May 27, 2021 17:16
@acozine
Copy link
Contributor

acozine commented May 27, 2021

I would vote to roll back the YAML changes in ansible/ansible#73708 if the cli option isn't accessible to users. @bcoca what was your goal when you added it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants