F5 playbook

214 views
Skip to first unread message

marco gregorio

unread,
May 19, 2015, 8:32:59 AM5/19/15
to ansible...@googlegroups.com
hello everyone,
I'd like to write a playbook which manages a bunch of F5-LTM network balancers.
As far as I can see there are some plugins for automating pools creation:

What I actually need is automating the creation of the UCS file (the F5 complete configuration backup package), its movement to an FTP server and exectute some other commands in tmsh  shell, which is the native F5 shell.
In fact, F5 supports both bash-like commands and  tmsh [argument 1] [argument 2]

Do I have any chance to do as I want to do by using Ansible? 
I am totally new to Ansible, as I just installed it on RHEL box and I am trying to figure out if it could be the solution to my project or whether I have to get back to bash code with expect (which is bloody)

Thank you in advance

Marco


Matt Baldwin

unread,
May 19, 2015, 1:58:40 PM5/19/15
to ansible...@googlegroups.com
I'm going to attempt to answer this. 

While I have never had to do this in Ansible, I believe what you propose is doable. Is it easy? That's a different story. :) 

The module you found uses the Python library bigsuds to manage the F5. This makes use of the F5's iControl SOAP API. It seems all actions for any F5 module in the extras repo uses local_action which simply has the module hitting the appropriate functions in the SOAP API. 

You will most likely need to write your own module to perform the actions you are hoping to perform. That would be written in Python and can be easily dropped in. Just model your own after the existing F5 modules in core. 

The way I would approach this is to first determine if the iControl SOAP API supports the functionality you desire, i.e. creation of the UCS file, commands you wish to execute via tmsh, etc.  If it does, then map out what a playbook might look like and figure out what all you need in your module(s). 

Not sure if that helps, but it's my 2 cents. :) 

-matt

Matt Hite

unread,
May 30, 2015, 2:23:59 PM5/30/15
to ansible...@googlegroups.com
I have written an unreleased standalone utility which does this:

"The F5 backup tool is an agent responsible for creating and collecting "user configuration sets" (UCS) files from BIG-IP devices. A UCS file is a backup archive containing BIG-IP configuration data that can be used to fully restore a device in the event of a failure or Return Materials Authorization (RMA) replacement."

I can see about adapting this into an Ansible module if there is demand for it.

-M



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9c5a32b0-e226-4327-853a-e4178807c42a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages