Install F5 Modules Collection¶
This document explains how to install the F5 Modules for Ansible.
- 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 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
Both the official or daily build are placed in this folder structure:
View the F5 Collection releases: https://galaxy.ansible.com/f5networks/f5_modules
Install the most recent release:
ansible-galaxy collection install f5networks.f5_modules
Daily Build (testing pre-released updates)¶
Download the daily build from AWS S3:
Install the collection build that was downloaded:
ansible-galaxy collections install f5networks-f5_modules-devel.tar.gz
Referencing a Collection in a playbook¶
There are two options for referencing a Collection in a playbook:
Preface each module, role, or resource with the collection name:
- name: Use Collections hosts: f5 connection: local tasks: - f5networks.f5_modules.bigip_pool: name: my-pool partition: Common ...
Specify the collection for the entire play (any module found in the collection will be used before core)
- name: Use Collections hosts: f5 connection: local collections: - f5networks.f5_modules tasks: - bigip_pool: name: my-pool partition: Common ...