How do I write an ansible handler with multiple tasks?
Answer / Mohit Kumar Singh
"To create a handler with multiple tasks in Ansible, you can define the tasks inside a list under the "handlers" key within your play. Here's an example:n[
{"name": "example_handler",n "handlers": [n {"command1": "..."},n {"command2": "..."}n ]n }"]
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of ansible?
How to keep secret data in a playbook?
How do I keep secret data in my playbook?
Why is ‘{{ }}’ notation used? And how can one interpolate variables or dynamic variable names?
What is the ask_pass module in ansible?
What are the variables in ansible?
When should I use {{ }}? Also, how to interpolate variables or dynamic variable names
What is ansible tower?
What features does the ansible tower provide?
why don’t you ship in x format?
Describe the working of ansible.
Can you copy files recursively onto a target host? If yes, how?