This module can have an optional minion-level configuration in /etc/salt/minion.d/ as follows:
ansible_timeout: 1200
The timeout is how many seconds Salt should wait for any Ansible module to respond.
salt.modules.ansiblegate.AnsibleModuleCaller(resolver)
DEFAULT_TIMEOUT = 1200
OPT_TIMEOUT_KEY = 'ansible_timeout'
call(module, *args, **kwargs)
Call an Ansible module by invoking it. :param module: the name of the module. :param args: Arguments to the module :param kwargs: keywords to the module :return:
salt.modules.ansiblegate.AnsibleModuleResolver(opts)
This class is to resolve all available modules in Ansible.
get_modules_list(pattern=None)
Return module map references. :return:
install()
load_module(module)
Introspect Ansible module.
module --
resolve()
Display help on Ansible standard module.
module --
Lists available modules. :return:
Run Ansible Playbooks
playbook -- Which playbook to run.
rundir -- Directory to run ansible-playbook in. (Default: None)
check -- don't make any changes; instead, try to predict some of the changes that may occur (Default: False)
diff -- when changing (small) files and templates, show the differences in those files; works great with --check (default: False)
extra_vars -- set additional variables as key=value or YAML/JSON, if filename prepend with @, (default: None)
flush_cache -- clear the fact cache for every host in inventory (default: False)
forks -- specify number of parallel processes to use (Default: 5)
inventory -- specify inventory host path or comma separated host list. (Default: None) (Ansible's default is /etc/ansible/hosts)
limit -- further limit selected hosts to an additional pattern (Default: None)
list_hosts -- outputs a list of matching hosts; does not execute anything else (Default: False)
list_tags -- list all available tags (Default: False)
list_tasks -- list all tasks that would be executed (Default: False)
module_path -- prepend colon-separated path(s) to module library. (Default: None)
skip_tags -- only run plays and tasks whose tags do not match these values (Default: False)
start_at_task -- start the playbook at the task matching this name (Default: None)
tags -- only run plays and tasks tagged with these values (Default: None)
syntax_check: perform a syntax check on the playbook, but do not execute it (Default: False)
Playbook return
CLI Example:
salt 'ansiblehost' ansible.playbook playbook=/srv/playbooks/play.yml
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.ansiblegate.html