diff options
| author | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
|---|---|---|
| committer | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
| commit | 533e79ba959143f0459431a486bfb85c56c72ddc (patch) | |
| tree | 91974de1bbbdc4c51c76ed591fc5c6e02a3342b6 /examples/echo_capture.yaml | |
| parent | 45019c81cfd0fc1d18dce18cdfd5f127c6d61073 (diff) | |
Releasing code version 1.8.0
Diffstat (limited to 'examples/echo_capture.yaml')
| -rw-r--r-- | examples/echo_capture.yaml | 32 |
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 |
