Python+Expect named.conf additions/removals

So i was getting tired of manually ssh'ing to the trio of name servers my company runs whenever we needed to add a new domain. I set out to script the process and ended up with this:

Both expect scripts take a single argument, the domain to be added, be sure to modify the host part of the spawn ssh lines to fit your needs.

The expect script run on the master for domain additions
The Python script run by the expect script on the master:
The Python script run by the expect script on the slaves:

The expect script run on the master for domain deletions
The Python script run by the expect script on all servers:

The expect scripts assume you use public key authentication with ssh.
These are some of my first attempts at python scripting and i'm not a seasoned expect/tcl guy either so if these can't be of any help to anyone maybe i'll receive some constructive criticism instead that can help me!

Comments

Popular posts from this blog

Lægra ping innlendrar umferðar á OpenVPN.is tengingu!

Umbraco Dictionary Key Performance