amelioration atelier
This commit is contained in:
19
fail_when.yml
Normal file
19
fail_when.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- hosts: test
|
||||
user: root
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: send script
|
||||
copy:
|
||||
src: random.sh
|
||||
dest: /tmp//random.sh
|
||||
mode: 0750
|
||||
|
||||
- name: execute script
|
||||
command: /tmp//random.sh
|
||||
register: result
|
||||
failed_when: 2|string in result.stdout
|
||||
|
||||
- name: display result
|
||||
debug:
|
||||
var: result
|
||||
Reference in New Issue
Block a user