Using Ansible to update Junos Device Configurations

Lately I’ve been using Ansible to update configurations on my JunOS devices. Here’s a fun little script to get you started. It will print the configuration of the DHCP service on a JunOS device, then update the name-server DHCP option to something new. The following playbook uses the JunOS ansible role

Install with “ansible-galaxy install Juniper.junos

The structure of your inventory file should be like so —

Here’s the complete playbook. You’ll want to change the “Commit” option to “True” when ready to run. Run with:

Share this content:

Updating Pulse Secure Connection Profiles with PowerShell

Are you using a Pulse Secure VPN Appliance and need to roll out a connection profile update to clients, but don’t want to reinstall them all using MSI’s and command line parameters? Then you’ve come to the right post!

I recently encountered a situation where I had a need to update the connection profiles on a large number of clients using a Pulse Secure Appliance. According to documentation and a forum post, this isn’t possible to do programmatically. After doing a little research, I wrote a script that will do the following.

1. Confirm that your Pulse Preconfiguration file is accessible from the client’s location.
2. Check for an active VPN connection. If it’s active, the file will be copied locally before the connection is broken.
3. Read the local connection database (connstore.dat) and remove each existing connection.
4. Import your custom pulse configuration and start the client again.

Here’s the full script — Hope you find it useful!

Share this content: