I have the role which has 10 tasks. I would like to exclude 1 task out of 10 as the task already executed in previous play.. Is there anyway to do
---
- name: Required Checks for the migration
hosts: localhost
gather_facts: no
become: yes
tasks:
- include_role:
name: validation
tasks_from: sshcheck
- name: check ssh connectivity
hosts: sshgroup
gather_facts: no
become: yes
any_errors_fatal: false
tasks:
- name: Checking SSH connectivity
wait_for:
host: "{{ inventory_hostname }}"
port: 22
- name: stale and mount permissions check
hosts: localhost
gather_facts: no
become: yes
roles:
- { name: validation, sshcheck: false }
...