Install F5 BIG-IP Next Collection¶
This section provides necessary information to install and setup the f5next_ansible collection.
Prerequisites¶
- Install Python: http://www.python.org/
- Install Ansible 2.9+: http://docs.ansible.com/ansible/latest/intro_installation.html
- F5 recommends you install Ansible by using virtualenv/pip.
Install the Collection¶
After installing Python and Ansible, the final task is to install the F5 Ansible Collections.
In the following examples, we assume that the collections are stored in a relative path to the working directory. All commands are run in the working playbook directory.
To set the working directory, add the following line to ansible.cfg in your working directory: collections_paths = ./collections
.
If you do not set the relative path, the default path is ~/.ansible/collections
.
Install Location¶
The installation location is relative based on the previous configuration steps: ./collections/ansible_collections/f5next_ansible
Installation¶
Install the most recent release, run the following command:
ansible-galaxy collection install f5networks.next
For more information, see the F5 Collection release on Ansible Galaxy.
Alternatively, you can also install the F5 collection from the Github, run the following command.
ansible-galaxy collection install git+https://github.com/F5Networks/f5-ansible-next#ansible_collections/f5networks/next -p ./collections/
Note
-p is the location in which the collection is installed. This location should be defined in the path for
Ansible to search for collections. An example of this would be adding collections_paths = ./collections
to your ansible.cfg.
Referencing a Collection in a playbook¶
Preface each module, role, or resource with the collection name:
- name: Use Collections hosts: f5 connection: httpapi tasks: - f5networks.next.cm_device_info: gather_subset: - all
Specify the collection for the entire play (any module found in the collection is used before core):
- name: Use Collections hosts: f5 connection: httpapi collections: - f5networks.next tasks: - cm_device_info: gather_subset: - all
Ansible community documentation¶
For more details on Ansible Collections, see the Using Ansible collections
See also¶
- Learn more about Ansible collections.
- Declarative collection overview
- F5 HTTPAPI connection plugin v2
- Playbook setup guide