Open francsw opened 3 years ago
---
- hosts: localhost
gather_facts: no
become: no
tasks:
- name: Download tthe file from node1
block:
- get_url:
url: http://node1/transaction_list
dest: ./transaction_list
- debug:
msg: "File downloaded"
- name: Replace BLANKFILE
replace:
path: ./transaction_list
regexp: '#BLANKLINE'
replace: '\n'
rescue:
- name: It fialed
debug:
msg: "node1 seems to be down. Try again later"
always:
- debug:
msg: "Attempt Completed"