community.general.saltstack connection – Allow ansible to piggyback on salt minions
Note
This connection plugin is part of the community.general collection (version 12.6.1).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
You need further requirements to be able to use this connection plugin,
see Requirements for details.
To use it in a playbook, specify: community.general.saltstack.
Synopsis
Run commands or put/fetch files to Salt minions by using the local Salt master as transport.
Ansible must run directly on the Salt master; this plugin uses
salt.client.LocalClientand does not support connecting to a remote Salt master.
Requirements
The below requirements are needed on the local controller node that executes this connection.
the
saltPython package must be installed on the Salt master (the Ansible controller)
Parameters
Parameter |
Comments |
|---|---|
The Salt minion ID to target. Default: Configuration:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
Notes
Note
Ansible must be run from the Salt master host; the plugin cannot reach a remote Salt master.
The inventory hostname (or
remote_addr) is treated as the Salt minion ID, not as a DNS name or IP address.The Salt master and its minion keys must already be configured and accepted before using this connection plugin.
File transfer via community.general.saltstack uses
hashutil.base64_decodefile(put) andcp.get_file_str(fetch); these Salt execution modules must be available on the targeted minions.