modules: Allow execution of plugins in an IPA client host.

Add a new configuration variable, `ipaapi_context` to IPAAnsibleModule
base specs, accepting only 'server' or 'client' values.

By using this variable, an user can select the environment context in
which the module will execute, server or client. This change will allow
configuration of the server without requiring login access (e.g. `ssh`)
to the server.

The default behavior is to use a `server` context, but this behavior
can be modified by the plugin, if it sets the `context` parameter when
connecting to IPA API.
This commit is contained in:
Rafael Guterres Jeffman
2021-09-03 11:03:24 -03:00
parent 3fefaadff4
commit 8bc6b01f49
2 changed files with 55 additions and 7 deletions

View File

@@ -30,4 +30,11 @@ options:
ipaadmin_password:
description: The admin password.
required: false
ipaapi_context:
description: |
The context in which the module will execute. Executing in a
server context is preferred. If not provided context will be
determined by the execution environment.
choices: ["server", "client"]
required: false
"""