ansible_python
ansible_python module
Execute Python-based Ansible modules. This is a bridge module that allows running traditional Ansible modules written in Python within the Spage environment.
Examples
- name: Run Python module
ansible_python:
module_name: "setup"
args:
gather_subset: "all"
- name: Execute custom Python module
ansible_python:
module_name: "my_custom_module"
args:
parameter1: "value1"
parameter2: 42
Note: This module requires Python and the specified Ansible module to be available on the target system. It's primarily used for compatibility with existing Ansible modules that haven't been ported to native Go implementations.
Module Capabilities
- Has Revert: false
- Provides Variables: None
Inputs
Parameter | Type | Description | Required | Default | Choices |
---|---|---|---|---|---|
args | any | Arguments to pass to the Python module. Can be a dictionary or other data structure depending on the module requirements. | false | ||
module_name | string | Name of the Python Ansible module to execute. | false |
Outputs
Field | Type | Description |
---|---|---|
changed | bool | |
failed | bool | |
msg | string | |
results | map[string]any |