Removing a Netscaler VIP using ansible

Removing a Citrix Netscaler/ADC vip manually is not very hard but you need to remove the cs vserver the lb veserver, the service and the servers. If you have more than one to remove it will take some time and it is also error prone. Automation can solve this things and Ansible is pretty easy to use.

So i want to share with you the below ansible playbook that removes one or as many vips as you like. It was written to remove cs vserver vips but it can easily adapted to remove lb vserver vips also.(you only have to put the lb’s in the list and skip the cs modules using –skip-tags argument when you run the playbook).

The playbook only needs the vip name specified in the vips file. After that using nitro api calls it will fetch the lb name , services and servers. All these are put in some variables and using the ansible netscaler modules, they are removed.

Here you can find the files for this project:
https://github.com/czirakim/remove-netscaler-vip

About the author

Mihai is a Network Aficionado with more than 10 years experience

Leave a Reply

Your email address will not be published. Required fields are marked *