###IMPORTANT If using F5 playbooks on the same host where OSA is bootstrapped, make sure it is Ansible 2.2. If not:
git clone https://github.com/ansible/ansible
######Just in case it is necessary to switch back to Ansible 1.9:
After that the environment is ready to use Ansible 2.2 for F5-bigip playbooks
git clone https://github.com/F5Networks/f5-ansible
Copy dynamic_inventory.py script from OSA to ./inventory Add the pattern to /etc/openstach_deploy/openstack_user_config:
f5_hosts: f5: ip: 10.36.190.199 Also it is necessary to add “10.36.190.199 f5” into /etc/hosts, or use proper DNS name for the balancer.
Add/replace vars in ./inventory/group_vars/all:
bigip_username: "adminm" bigip_password: "password" bigip_port: "443" bigip_partition: "Common" validate_certs: "no"
pool_lb_method: "round_robin" pool_reselect_tries: 10 pool_lb_method_alt: - "ratio_member" - "least_connection_member" - "observed_member" - "predictive_member" - "ratio_node_address" - "least_connection_node_address" - "fastest_node_address" - "observed_node_address" - "predictive_node_address" - "dynamic_ratio" - "fastest_app_response" - "least_sessions" - "dynamic_ratio_member" - "l3_addr" - "weighted_least_connection_member" - "weighted_least_connection_node_address" - "ratio_session" - "ratio_least_connection_member" - "ratio_least_connection_node_address" connection_limit: 100 rate_limit: 50 ratio: 2
Create necessary vars file so that it can be used together with the playbook:
pool_name: glance_api #pool_members:
pool_member_port: 9292 vs_profiles1:
- http
node_host: "10.0.0.100" #VIP address vs_description: "glance-api" vs_name: "glance-api" vs_port1: 9292 vs_snat1: "Automap" va_address: 10.0.0.100 #VIP address
ansible-playbook -i inventory/dynamic_inventory.py -e @add_vars /root/f5-ansible/playbooks/bigip_testpools_dyn.yaml
#################################################################################
This repository provides the foundation for working with F5 devices and Ansible. The architecture of the modules makes inherent use of the BIG-IP SOAP and REST APIs as well as the tmsh API where required.
These modules are freely provided to the open source community for automating BIG-IP device configurations using Ansible. Support for the modules is provided on a best effort basis by the F5 community. Please file any bugs, questions or enhancement requests using Github Issues
- Ansible 2.2.0 or greater
- Advanced shell for user account enabled
- bigsuds Python Client 1.0.4 or later
- f5-sdk Python Client, latest available
All documentation is hosted on ReadTheDocs.
When writing new modules, please refer to the Guidelines document.
The purpose of this repository is to serve as a staging ground for Ansible modules that we would prefer to have upstreamed over the course of time.
The modules in this repository may be broken due to experimentation or refactoring
We are curious to know what sort of modules you want to see created. If you have a use case and can sufficiently describe the behavior you want to see, open an issue here and we will hammer out the details.
The code provided in this repository should be considered F5 contributed, and not F5 supported. If you are familiar with similar verbiage on DevCentral, then you are familiar with what it means here.