amelioration atelier

This commit is contained in:
2021-03-13 22:11:41 +01:00
parent 9faf127833
commit 21b843694e
3 changed files with 73 additions and 0 deletions

19
fail_when.yml Normal file
View 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