Skip to content

blocks, local_action, ... discoverability issue #2156

Open
@agowa

Description

@agowa

Summary

Hi, currently it is a bit hard to find the documentation for e.g. "block" and "local_action". Strictly speaking they're not "builtin modules" but statements. However it is fair to assume that users would look first into this index page for ansible.builtin when looking for them. esp. because the search in the wiki is kinda bad at surfacing information for any of the keywords, also their options aren't that well documented currently either.

Therefore I'd like to suggest two things.

  1. If not already supported allow block to also be written as ansible.builtin.block, local_action as ansible.builtin.local_action, and so on. (this is optional, but they're designed to look like a modules within a playbook and are builtin. Therefore at least for me this would make sense). Declined in add statements as pseudo modules to ansible.builtin (block, local_action, ...) ansible#84312
  2. Add documentation using the module docs-template and add them to the index page of ansible.builtin. Either within their own section or as "just another module". So that all of their options are documented in our standard format at a place with better SEO.

I regularly hit this discoverability issue when looking for either some of the advanced parameters/syntax or when trying to help someone new to ansible solve a problem that demands them.

Also, about local_action in particular, for its verbose syntax it is currently not documented how to call a module that accepts a free_form argument e.g. ansible.builtin.shell module. New people (if they find the docs of it at all) often write it either:

- name: Example A
  ansible.builtin.local_action:
    module: ansible.builtin.shell echo foobar
- name: Example B
  ansible.builtin.local_action:
    module: ansible.builtin.shell
    free_form: echo foobar

What do you think? Yey or Ney?

Additional Information

Relevant code:

Relevant documentation:

Metadata

Metadata

Assignees

No one assigned

    Labels

    new_contributorThis PR is the first contribution by a new community member.

    Type

    No type

    Projects

    Status

    🆕 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions