Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

On ansible playbook which attribute fall for cmmand "set date ntp"?

‎03-06-2020 01:45 AM

Hi all,

 

 

May i know if  i want do script "set date ntp" using ansible which attribute it fall under?

 

 

Thanks and appreciate any feedback

 

3 REPLIES 3
Highlighted
Junos Automation (Scripting)

Re: On ansible playbook which attribute fall for cmmand "set date ntp"?

‎03-06-2020 09:41 PM

Hi 

 

As set date ntp is an operational command you can try 

juniper_junos_command or juniper_junos_rpc. One of these modules should work for this command.

 

More details in the below link.

 

https://www.juniper.net/documentation/en_US/junos-ansible/topics/topic-map/junos-ansible-commands-rp...

 

Hope this helps.

Highlighted
Junos Automation (Scripting)

Re: On ansible playbook which attribute fall for cmmand "set date ntp"?

‎03-10-2020 08:00 AM

Hi Raviky,

 

I'm try using juniper_junos_command by replacing the "show version" to "set date ntp" but it not work.

 

 

Thanks and appreciate any feedback

 

Highlighted
Junos Automation (Scripting)

Re: On ansible playbook which attribute fall for cmmand "set date ntp"?

‎03-10-2020 09:35 AM

Hi kronicklez,

 

Try juniper_junos_rpc for "request-set-date-ntp" with kwargs as server IP.

 

Hope this helps.

Regards,
-r.

--------------------------------------------------

If this solves your problem, please mark this post as "Accepted Solution."
Kudos are always appreciated :).

Feedback