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:
      ...

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