Running task from Different roles in parallel

0 votes

- { role: RHEL_register_RHN, ignore_errors: yes }
    - { role: nmon-ansible-role, ignore_errors: yes }
    - { role: hardening-ansible-role, ignore_errors: yes}

I am aware roles can't run in parallel but I want to execute the task in parallel from different ansible roles. I am able to execute the task in parallel but how can I restrict the number of tasks executing in parallel.

Oct 6 in Ansible by Shambhavi
• 120 points

recategorized Oct 7 by MD 41 views

1 answer to this question.

0 votes

Hi@Shambhavi,

You can use tags in your task. For example, You can assign the same tag in four tasks. So whenever you need to run only those four tasks, then you can use that tag at the time of running the Ansible playbook.

answered Oct 7 by MD
• 79,930 points

Related Questions In Ansible

0 votes
1 answer

stopping different hosts from reading the same value when usign ansible in loop

Try using this. Create a new directory ...READ MORE

answered Jul 27, 2018 in Ansible by DareDev
• 6,870 points
142 views
0 votes
1 answer

Running to plays in one playbook

The inventory file is loaded before a ...READ MORE

answered Jun 25, 2018 in Ansible by ajs3033
• 7,280 points
218 views
0 votes
2 answers

How do you stop Ansible from creating .retry files in the home directory?

[defaults] ... retry_files_enabled = True # Create them ...READ MORE

answered Apr 5, 2019 in Ansible by anonymous
1,561 views
+1 vote
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
809 views
+2 votes
1 answer
0 votes
1 answer

How to run a playbook from a specific task in Ansible?

Hi@akhtar, The --start-at-task option allows you to start ...READ MORE

answered Sep 15 in Ansible by MD
• 79,930 points
144 views
0 votes
1 answer

Become : yes is not working while running ansible playbook from Jenkins pipeline job

Hi, Jenkins will not able to run the ...READ MORE

answered Jul 21 in Ansible by MD
• 79,930 points
253 views