Home > Articles > Details

ERROR! The requested handler 'restart ufw' was not found in either the main handlers list nor in the listening handlers list

Question: Ansible Error: "ERROR! The requested handler 'restart ufw' was not found in either the main handlers list nor in the listening handlers list"

What is going on? notify: restart is not working



Please Login to see the rest of the answer
Answer: There is a chance that the ufw is not enabled and the Service hasn't started yet. This error makes sense because there is no service or handler to start. The best way to resolve it is to make sure the Ansible Playbook executes the following task first before making sure the Service is up and running.

- name: Enable ufw
     ufw: state=enabled





If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy