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:
parent
4f1aedbbf2
commit
be44b8abd4
4
resources/ansible_sample/actions/run.yaml
Normal file
4
resources/ansible_sample/actions/run.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
sudo: yes
|
||||||
|
roles:
|
||||||
|
- { role: "test_role" }
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
var1: initial
|
||||||
|
uuid: stuff
|
||||||
|
def1: the_same
|
@ -0,0 +1 @@
|
|||||||
|
- debug: msg="Variable1 {{ var1 }} with uuid {{ uuid }} and default var {{ def1 }}"
|
11
resources/ansible_sample/meta.yaml
Normal file
11
resources/ansible_sample/meta.yaml
Normal 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'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user