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

Missing documentation for module.run #45360

Closed
rhoths opened this issue Jan 10, 2018 · 5 comments
Closed

Missing documentation for module.run #45360

rhoths opened this issue Jan 10, 2018 · 5 comments
Labels
Documentation Pending-Discussion
Milestone

Comments

@rhoths
Copy link
Contributor

@rhoths rhoths commented Jan 10, 2018

The documentation for the module state appears to be at least partially broken. The entire function documentation for the module.run function is missing. There are some examples and basic info for the function in the module documentation, but the function signature and function documentation is absent.

@V3XATI0N
Copy link
Contributor

@V3XATI0N V3XATI0N commented Jan 10, 2018

Ran into this earlier. The documentation is sparse, and what little there is is apparently wrong.

Trying to run a win_wua.get call, the documentation would lead you to believe you should put

awesome_state_id:
  module.run:
    win_wua.get:
      - name: KB12345678

but doing it that way causes it to spew out awesome_state_id is not formed as a list. Huh?

Actually, you have to do this:

awesome_state_id:
  module.run:
    - name: win_wua.get
    - m_names:
      - KB12345678

which doesn't look anything like the documentation. so... yeah.

@rhoths
Copy link
Contributor Author

@rhoths rhoths commented Jan 10, 2018

@V3XATI0N The module usage (and deprecation warnings I was getting) is largely what drove me to asking about the documentation in the IRC channel. @gtmanfred helpfully pointed out that the 2017.7.0 release notes contain information on the "new" module.run syntax and how to enable it. It looks like your first example would run if you enabled the new behavior with the following in your minion config:

use_superseded:
  - module.run

@gtmanfred
Copy link
Contributor

@gtmanfred gtmanfred commented Jan 10, 2018

It should also be updated it is this

awesome_state_id:
  module.run:
    - win_wua.get:
      - name: KB12345678

The documentation is wrong and the module name should have a - so it is a list when you use use_superseeded.
#43130

@garethgreenaway garethgreenaway added this to the Blocked milestone Jan 10, 2018
@garethgreenaway garethgreenaway added Documentation Pending-Discussion labels Jan 10, 2018
@gtmanfred
Copy link
Contributor

@gtmanfred gtmanfred commented Jan 10, 2018

@isbm i have fixed the format for the new module.run here #45381

But it looks like the module.run docstring is not showing in the docs at all because it is a private function. Is there a reason this couldn't be made a public function so that the docs could show up?

Thanks,
Daniel

@gtmanfred
Copy link
Contributor

@gtmanfred gtmanfred commented Oct 1, 2018

working on in #49851

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

No branches or pull requests

4 participants