solution ignore_errors

This commit is contained in:
2022-11-01 18:22:07 +01:00
parent de6dbc2b8c
commit c9c74e93cd
3 changed files with 63 additions and 3 deletions

18
ignore_errors.yml Normal file
View File

@@ -0,0 +1,18 @@
---
- hosts: cibles
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