Below ansible-playbook is run using ansible-playbook playbook.yml --tags=rancher
- name: instal docker
hosts: rancher-server
become: yes
gather_facts: yes
roles:
- role: some_galaxy_role
- name: install rancher
hosts: rancher-server
become: yes
gather_facts: no
tasks:
- name: install rancher
debug:
tags:
- rancher
Only install rancher play is selected by rancher tag and runs as expected. However fact gathering of the first play install docker still runs and takes time. Why and is there a way to avoid it?
Below is the output of the playbook run:
PLAY [install docker] *********************************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************************
ok: [rancher-server1]
ok: [rancher-server2]
PLAY [install rancher]