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 in Ansible by Harsh
41 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Kevin

Related Questions In Ansible

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
• 6,480 points
225 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,520 points
465 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,620 points
54 views
0 votes
1 answer

ansible playbook: using multiple variables in loops

Use an indexed hostname, and then define ...READ MORE

answered Jul 16, 2018 in Ansible by DareDev
• 6,520 points
2,802 views
+13 votes
2 answers
0 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 in Ansible by Sameer
42 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.