summaryrefslogtreecommitdiff
path: root/examples/echo_capture.yaml
diff options
context:
space:
mode:
authorluisgulo <luisgulo@gmail.com>2025-10-24 18:01:10 +0200
committerluisgulo <luisgulo@gmail.com>2025-10-24 18:01:10 +0200
commit533e79ba959143f0459431a486bfb85c56c72ddc (patch)
tree91974de1bbbdc4c51c76ed591fc5c6e02a3342b6 /examples/echo_capture.yaml
parent45019c81cfd0fc1d18dce18cdfd5f127c6d61073 (diff)
Releasing code version 1.8.0
Diffstat (limited to 'examples/echo_capture.yaml')
-rw-r--r--examples/echo_capture.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/echo_capture.yaml b/examples/echo_capture.yaml
new file mode 100644
index 0000000..fa44030
--- /dev/null
+++ b/examples/echo_capture.yaml
@@ -0,0 +1,32 @@
+parallelism: false
+hosts: localhost
+
+tasks:
+ - name: Ejecutar comando simple
+ module: run
+ args:
+ command: "ls -L /tmpAAA"
+ become: false
+ capture_log: ls_resultado
+ capture_err: ls_error
+
+ - name: Mostrar capture_log con modulo echo
+ module: echo
+ args:
+ message: "{{ ls_resultado }}"
+ become: false
+ condition: "[ {{ ls_error }} -eq 0 ]"
+
+ - name: Mostrar capture_err con modulo echo
+ module: echo
+ args:
+ message: "{{ ls_error }}"
+ become: false
+
+ - name: Prueba sustitucion en modulo echo
+ module: echo
+ args:
+ variableA: "Texto de variable A"
+ variableB: "Texto de variable B"
+ message: "Mostramos A: {{ variableA }} y B: {{ variableB }}"
+ become: false