Execute ansible playbook periodically

0 votes
I have an ansible playbook which has two plays. I want to execute that twice periodically one after the other. Is that possible?
Jan 17, 2019 in Ansible by Harsh
1,089 views

1 answer to this question.

0 votes

You could use include_role, according to the documentaion:

  • Loads and executes a role as a task dynamically. This frees roles from the roles: directive and allows them to be treated more as tasks.
  • Unlike import_role, most keywords, including loops and conditionals, apply to this statement.
  • This module is also supported for Windows targets.
- name: 'Include role'
  include_role:
    name: '{{ roles}}'
answered Jan 17, 2019 by Kevin

Related Questions In Ansible

0 votes
0 answers

How do I execute MySqL query using Ansible playbook

Dear team, I'm trying to execute MySQL , ...READ MORE

Oct 4, 2021 in Ansible by anonymous
• 140 points
2,880 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 7,340 points
6,503 views
0 votes
1 answer

Permission denied when running ansible playbook through jenkins

Jenkins uses it's own user to execute ...READ MORE

answered Jun 25, 2018 in Ansible by DareDev
• 6,890 points
3,657 views
0 votes
1 answer

devops , how to create user using ansible playbook

root doesn't need a password to switch ...READ MORE

answered Jul 16, 2018 in Ansible by Kalgi
• 2,680 points
955 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,503 views
+2 votes
1 answer
0 votes
1 answer

Execute a command using ansible playbook

Hey @Reshma, You can use the URI ...READ MORE

answered Jan 17, 2019 in Ansible by Sameer
5,039 views
0 votes
1 answer

Execute ansible playbook on a docker container

Hey @Ram, you could use a dockerfile ...READ MORE

answered Jan 22, 2019 in Ansible by Vedant
5,612 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP