Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Automation with F5 LTM

Hello ALL, I'm working on a taks to get the configuration of a VIP and compare it with the VIP configuration on other LTM device.

Does the above task achievable through Ansible/python script?

Regards, Thiyagu

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Ansible is more of a configuration tool using a declarative model which will not, to my knowledge, directly be able to compare but could be used to gather facts using the BIGIP Device Facts module to get information around

Ansible bigip_device_facts – Collect facts from F5 BIG-IP devices

For example can use the following in your Ansible playbook to get just the Virtual Server facts:

- name: Collect BIG-IP Virtual Server facts
  bigip_device_facts:
    gather_subset:
      - virtual-servers
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

Once you have this can easily write this out to a file or even pass it to a Python script to locate the correct Virtual Server and compare configurations.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

I have had some success approaching this slightly differently - I query the api of my "master" device and then use those values to set the configuration on my "slave" device with --check. This tells me what changes ansible would have made, so gives me an indication of the differences. Clunky, but has helped me out in a pinch

0