Add local_ansible handler that will execute ansible-playbook locally

This approach allows to reuse ansible roles (developer by community).
Inventory is not created, all additional variables passed to playbook execution
This commit is contained in:
Dmitry Shulyak 2015-07-01 12:13:36 +03:00
parent 4f1aedbbf2
commit be44b8abd4
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,4 @@
- hosts: localhost
sudo: yes
roles:
- { role: "test_role" }

View File

@ -0,0 +1,4 @@
var1: initial
uuid: stuff
def1: the_same

View File

@ -0,0 +1 @@
- debug: msg="Variable1 {{ var1 }} with uuid {{ uuid }} and default var {{ def1 }}"

View File

@ -0,0 +1,11 @@
id: ansible_sample
handler: local_ansible
version: 0.0.1
input:
var1:
type: str!
value: some_value
uuid:
type: str!
value: 'aa1das1231'