F5 HTTPAPI Connection Plugin¶
Connection¶
The BIG-IP Next collection uses the connection type httpapi to connect to the BIG-IP Next Central Manager. The following is an example.
- name: This is my play
hosts: bigip-next
connection: httpapi
tasks:
...
Using the collection with a proxy¶
Currently the following way of specifying the proxy in the playbook is not supported.
- name: This is my play
hosts: bigip
connection: httpapi
environment:
http_proxy: http://proxy.example.com:8080
https_proxy: http://proxy.example.com:8080
We are exploring options to support the above way of using a proxy. If the user must use a proxy then they need to set the environment variables on the command line as shown below.
export HTTPS_PROXY=https://proxy.example.com:8080
export HTTP_PROXY=http://proxy.example.com:8080
ansible-playbook -i inventory playbook.yml
Authentication¶
For the purpose of authentication the HTTPAPI connection plugin uses specific vars/env-vars that must be associated with the host
The following is an example of what may be used in your host_vars to connect to your BIG-IP Next.
ansible_host: bigip-next-hostname
ansible_user: admin
ansible_httpapi_password: SuperSecret
ansible_httpapi_port: 443
ansible_network_os: f5networks.next.cm
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
Tips¶
- If you are migrating from the f5_module collection, you can leave the provider variables and reference them from the new HTTPAPI connection variables:
ansible_host: "{{ provider.server }}"
ansible_user: "{{ provider.user }}"
ansible_httpapi_password: "{{ provider.password }}"
ansible_httpapi_port: "{{ provider.server_port }}"
ansible_network_os: f5networks.next.cm
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: "{{ provider.validate_certs }}"
See also¶
- Learn more about Ansible collections.
- Install declarative collection
- Declarative collection overview
- Playbook setup guide