Skip to content

Alternative Installation Methods

erjac77 edited this page Jun 28, 2018 · 1 revision

Ansible Galaxy Role

To run the latest stable released version of the module-f5bigip role, execute the ansible-galaxy install command from your Ansible host:

[root@ansible ~]# ansible-galaxy install erjac77.module-f5bigip
- downloading role 'module-f5bigip', owned by erjac77
- downloading role from https://github.com/erjac77/ansible-module-f5bigip/archive/1.0.0.tar.gz
- extracting erjac77.module-f5bigip to /usr/local/etc/ansible/roles/erjac77.module-f5bigip
- erjac77.module-f5bigip was installed successfully

It's also possible to point directly to the git repository and specify a version, branch name or commit hash:

ansible-galaxy install git+https://github.com/erjac77/ansible-module-f5bigip.git,dev,erjac77.module-f5bigip

Clone Repository and Library Search Path

You can also clone the git repository and copy the content of the module-f5bigip role's ./library directory into your project's ./library directory.

[root@ansible ~]# git clone https://github.com/erjac77/ansible-module-f5bigip.git
[root@ansible ~]# cp ansible-module-f5bigip/library/* my_project/library

Then, you need to tell Ansible to look for modules in the project's ./library directory. To do so, you have to change the library path in the ansible.cfg like this:

[defaults]
...
library = ./library
...

Testing

For testing purpose, you can git clone this repository and run the env-setup script.

[root@ansible ~]# git clone https://github.com/erjac77/ansible-module-f5bigip.git
[root@ansible ~]# cd ansible-module-f5bigip
[root@ansible ansible-module-f5bigip]# source env-setup

This will set your $ANSIBLE_LIBRARY variable to the repo location and the installed Ansible library path. For example:

[root@ansible ansible-module-f5bigip]# echo $ANSIBLE_LIBRARY
/root/ansible-module-f5bigip/library:/usr/share/ansible