Files
sib_11_gestion_erreurs/fail_when.yml
2021-03-13 22:11:41 +01:00

19 lines
333 B
YAML

---
- 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