With ansible.call these states allow individual Ansible module calls to be
made via states. To call an Ansible module function use a module.run
state:
some_set_of_tasks:
ansible:
- system.ping
- packaging.os.zypper
- name: emacs
- state: installed
salt.states.ansiblegate.
AnsibleState
¶Ansible state caller.
get_args
(argset)¶Get args and kwargs from the argset.
argset --
salt.states.ansiblegate.
playbooks
(name, rundir=None, git_repo=None, git_kwargs=None, ansible_kwargs=None)¶Run Ansible Playbooks
name -- path to playbook. This can be relative to rundir or the git repo
rundir -- location to run ansible-playbook from.
git_repo -- git repository to clone for ansible playbooks. This is cloned using the git.latest state, and is cloned to the rundir if specified, otherwise it is clone to the cache_dir
git_kwargs -- extra kwargs to pass to git.latest state module besides the name and target
ansible_kwargs -- extra kwargs to pass to ansible.playbooks execution module besides the name and target
Ansible playbook output.
run nginx install:
ansible.playbooks:
- name: install.yml
- git_repo: git://github.com/gituser/playbook.git
- git_kwargs:
rev: master