Automation

 View Only
last person joined: 16 hours ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  Question on Ansible Handlers

     
    Posted 07-31-2024 09:46

    Hi.

    Are you using Ansible handlers when automating Junos devices? Can you mention what for? 

    Thanks,

    Deepak



  • 2.  RE: Question on Ansible Handlers
    Best Answer

     
    Posted 07-31-2024 10:29

    I guess the most common scenarios where I use handlers within Ansible would be, I need to reboot a device and wait for some period of time for it to start the reboot process, and again for the reboot process to complete.

    So this would be two handlers, one to wait a determined amount of time for the reboot to initiate, and another handler to identify when the device is reachable once more (IP reachable, or NETCONF up etc.).

    Discussed in a little more detail here: https://www.juniper.net/documentation/us/en/software/junos-ansible/ansible/ansible.pdf

    In some scenarios the handler might actually do some stuff, for example notifying when NETCONF is available after a reboot, other times a handler might just be a sleep statement to wait a fixed period of time. 

    A few examples can be found in the link I've shared.

    Regards,



    ------------------------------
    Andy Sharp
    ------------------------------



  • 3.  RE: Question on Ansible Handlers

     
    Posted 08-01-2024 00:58

    Thanks Andy!