Using the BIG-IP Next collection¶
This example demonstrates using the BIG-IP Next collection to Add/Delete vSphere provider onto Central Manager.
Step 1: Install the BIG-IP Next collection
ansible-galaxy collection install f5networks.next
Step 2: Create a playbook
Create a playbook that uses the BIG-IP Next collection to Add/Delete vSphere provider onto Central Manager.
Example next_example_playbook.yaml
---
- name: CMNEXT
hosts: cmnext
connection: httpapi
gather_facts: false
collections:
- f5networks.next
vars:
ansible_user: "admin"
ansible_httpapi_password: "password"
ansible_network_os: "f5networks.next.cm"
ansible_httpapi_use_ssl: true
ansible_httpapi_use_proxy: false
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
ansible_command_timeout: 1800
persistent_log_messages: true
partition_name: DemoPartition
provider_name: "myvsphere"
vsphere_address: "vpshere_host"
vpshere_user: "vpshere_user"
vpshere_pass: "vpshere_pass"
tasks:
- name: Create/Add a vsphere provider
cm_next_provider:
name: "{{ provider_name }}"
type: "vsphere"
address: "{{ vsphere_address }}"
username: "{{ vpshere_user }}"
password: "{{ vpshere_pass }}"
Step 3: Run the playbook
Run the playbook using the ansible-playbook command.
Step 4: Verify the results
Verify the results by checking the Central Manager UI.