When trying to run 2 plays, if first one hit block rescue, why it will stop 
second play?

- name: Install docker.
hosts: all
tasks:
- name: Include prerequisites tasks for RedHat-based OS.
block:
- name: Include prerequisites tasks.
ansible.builtin.include_tasks: "{{ ansible_distribution }}-{{ 
ansible_distribution_major_version }}.yml"
rescue:
- name: Install dependencies.
ansible.builtin.package:
name: "{{ docker_version }}"
use: dnf
state: present
become: true

- name: Other ansible roles.
hosts: all
roles:
- role: ansible-role-a
- role: ansible-role-b
- role: ansible-role-c


Scenario above: "Other ansible roles" won't be executed because it hit 
rescue in "Install docker." I thought block rescue were supposed to be used 
to prevent hitting errors and exit?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e4e28995-0dfb-45de-82d6-186cec64219an%40googlegroups.com.

Reply via email to