trfore.omada_install
Ansible Role: omada_install
This role installs the Omada SDN controller on RedHat/CentOS and Debian/Ubuntu systems.
It fetches the latest Omada SDN controller software from TP-Link.
If you want to download the software manually to your control host, get the file Omada_SDN_Controller_v5.*.*_Linux_x64.tar.gz
and place it in your files
directory. Then adjust your playbook with these variables:
omada_tar_src: Omada_SDN_Controller_v5.*.*_Linux_x64.tar.gz
omada_tar_src_remote: false
Please see the 'Example Playbooks' section for working examples. Note that this role does not set up the Omada controller; it uses default configurations. The service runs as a non-root user by default, but you can change this by setting omada_non_root: false
.
Installing the Role
To install this role, use the Ansible Galaxy command line:
ansible-galaxy role install trfore.omada_install
Tested Platforms and Versions
- MongoDB Community:
4.4.x
- Omada SDN:
5.x.x
- CentOS Stream 8
- Debian 10
- Ubuntu 20.04
Requirements
You need the MongoDB Community Edition:
mongodb-org >=4.4.0
. There is a role available for installation via a package manager:trfore.mongodb_install
.You also need Apache Commons Daemon:
jsvc >= 1.1.0
. A role for installing the latest version is available:trfore.jsvc
.You can install these roles by creating a
requirements.yml
file and usingansible-galaxy install -r requirements.yml
.# requirements.yml --- roles: - name: trfore.jsvc - name: trfore.mongodb_install - name: trfore.omada_install
Note: For Ubuntu 20.04, this role installs OpenJDK 11. The
jsvc
package available through APT is< 1.1.0
and will only work with OpenJDK 8. If you want to use the older version, setomada_dependencies
in your playbook as follows (see 'Example Playbooks'):omada_dependencies: ["curl", "openjdk-8-jre-headless", "jsvc"]
Role Variables
Here are the available variables and their default values (check defaults/main.yml
):
Variable | Default | Description | Required |
---|---|---|---|
omada_tar_src | URL | The URL or path to the Omada SDN tar file | No |
omada_tar_src_remote | true |
Set to true if downloading from a URL |
No |
omada_tar_dir | /var/tmp |
The temporary directory for extracting and installing Omada SDN | No |
omada_tar_folder | Automatic | Automatically determined from omada_tar_src |
Automatic |
omada_non_root | true |
Set to true to run Omada SDN as a non-root user |
No |
omada_remove_tar_folder | false |
Set to true to remove the temporary directory after installation |
No |
OS specific variables (check vars/main.yml
):
Variable | Default | Description | Required |
---|---|---|---|
omada_dependencies | ["curl", "openjdk-11-jre-headless"] |
Required packages for Omada SDN (Debian) | No |
omada_dependencies | ["curl", "java-11-openjdk-headless.x86_64"] |
Required packages for Omada SDN (RHEL) | No |
Dependencies
- Apache Commons Daemon:
jsvc >= 1.1.0
- MongoDB Community Edition:
mongodb-org >=4.4.0
Example Playbooks
Here's a simple example playbook:
- hosts: servers
become: true
roles:
- name: Install MongoDB Community
role: trfore.mongodb_install
- name: Install jsvc Binary
role: trfore.jsvc
- name: Install Omada SDN
role: trfore.omada_install
post_tasks:
- name: Verify Omada SDN Is Running
tags: ["omada", "test"]
ansible.builtin.uri:
url: https://127.0.0.1:8043/login
status_code: 200
validate_certs: false
register: result
until: result.status == 200
retries: 12
delay: 10
If you download the tar file manually:
- hosts: servers
become: true
vars:
omada_tar_src: Omada_SDN_Controller_v5.*.*_Linux_x64.tar.gz
omada_tar_src_remote: false
roles:
- name: Install MongoDB Community
role: trfore.mongodb_install
- name: Install jsvc Binary
role: trfore.jsvc
- name: Install Omada SDN
role: trfore.omada_install
If you want to install OpenJDK JRE 8 and jsvc using APT (only for Ubuntu 20.04):
- hosts: servers
become: true
vars:
omada_dependencies: ["curl", "openjdk-8-jre-headless", "jsvc"]
roles:
- name: Install MongoDB Community
role: trfore.mongodb_install
- name: Install Omada SDN
role: trfore.omada_install
when: ansible_distribution == 'Ubuntu'
License
MIT License
Author Information
Created by Taylor Fore (https://github.com/trfore)
Related Roles
GitHub | Ansible Galaxy |
---|---|
ansible-role-jsvc | trfore.jsvc |
ansible-role-mongodb-install | trfore.mongodb_install |
ansible-role-omada-install | trfore.omada_install |
References
Omada Resources
Install the Omada SDN controller on RedHat/CentOS and Debian/Ubuntu.
ansible-galaxy install trfore.omada_install