2

I have automated my network provisioning with ztp and ansible and it's already rocking.
When ztp finishes I have a working config but I'm missing 2 things:

  • the xe-0/1/2 and xe-0/1/3 on my ex3300 are still configured as vc-ports
  • my rescue config is not saved

Is there a way to issue requests to the system via ztp?
My approach would be to configure an event-policy to run these commands when ztp is finished, but I fail to find a event after the ztp process has finished.
Thanks in advance for your help.

3

Not via ZTP, but I've just put together a couple of Ansible modules for you to handle both of these tasks here: https://github.com/dfex/dfex-ansible-modules

They're pretty self-explanatory - junos_save_rescue for saving the rescue configuration, and junos_op_cli for executing arbitrary Operational mode commands in Junos.

There is a junos-op-cli example in the README specifically targeting the removal of the EX3300 default vc-ports.

Feedback and improvement suggestions welcome.

1

As far a i know your not able to do that with ztp.

But why not let Ansible login and use raw commands ? or create a bash script with the expect command and let Ansible run that ?

i know both solutions are not ideal but they can get the job done.

Good luck! hope my 2 cents helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.