You will need to add a few other modules
$ pip install f5-sdk bigsuds netaddr deepdiff request objectpath openpyxl
You will need to create and copy a root ssh-key to BOTH the bigip devices $ ssh-keygen Accept the defaults $ ssh-copy-id -i /root/.ssh/id_rsa.pub root@<bigip-management-ip> Example: $ ssh-copy-id -i /root/.ssh/id_rsa.pub firstname.lastname@example.org
You will then need to edit the simple-ha-pair.xlsx file to your preferences
Then execute the playbook as root
$ ansible-playbook simple-ha-pair.yml
In the simple-ha-pair.xlsx spreadsheet: The HA VLAN must be called 'HA' The settings where yes/no are required must be yes/no and not YES/NO or Yes/No One device must have primary=yes and the other must have primary=no
I have added only Standard Virtual Servers with http, client & server ssl profiles, but hopefully it is pretty obvious from the simple-ha-pair.yml playbook how to add in others.
Trunks haven't been added. This is because you can't have trunks in VE and also there is no F5 ansible module to add trunks. It could be done relatively easily using the bigip_command module, and hopefully the bigip_command examples in the simple-ha-pair.yml file will show that.
I haven't added in persistence settings, as this would require a dropdown list of some kind. Is simple enough to do.
Automation does not sit well with complication
To update if there are any changes, please cd to the same folder and run: $ git pull
You will notice there is also a reset.yml playbook to reset the devices to factory defaults. To run the reset.yml playbook as root: $ ansible-playbook reset.yml