blob: fa164c9cca80bc59eb9b478309395a0aa9e0a9b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
---
- hosts: all
tasks:
- name: execute swFallback operation
shell: ./swm/swFallback --filter {{filter}}
ignore_errors: yes
register: fallback_result
- name: write output to file
local_action: copy content="{{fallback_result.stdout}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt"
when: fallback_result.stdout != ""
- name: use result of swFallback as the result of Playbook
fail:
msg: "{{fallback_result.stderr}}"
when: fallback_result is failed
|