F
- name: test
hosts: all
become: yes
serial: 1
any_errors_fatal: true
tasks:
- name: test task 1
block:
- name: Generete config
template: src=./conf.j2 dest=/home/test/{{ item.conf }}.conf mode=0777
.........................
tags: gen_conf
..................................
- name: Send email to user
mail:
run_once: True
delegate_to: localhost
tags: send_email