From 72a60a988b263eb70be8602e61d81d92a1799540 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 7 May 2019 18:52:07 +0200 Subject: [PATCH] Unifi playbook --- roles/unifi-controller/tasks/main.yml | 41 +++++++++++++++++++++++++++ unifi.yml | 5 ++++ 2 files changed, 46 insertions(+) create mode 100644 roles/unifi-controller/tasks/main.yml create mode 100644 unifi.yml diff --git a/roles/unifi-controller/tasks/main.yml b/roles/unifi-controller/tasks/main.yml new file mode 100644 index 0000000..0ff14dd --- /dev/null +++ b/roles/unifi-controller/tasks/main.yml @@ -0,0 +1,41 @@ +--- +# Install HTTPS support for APT +- name: Install apt-transport-https + apt: + update_cache: true + name: + - apt-transport-https + - gpg + - dirmngr + state: present + register: apt_result + retries: 3 + until: apt_result is succeeded + +# Add the key +- name: Configure the apt key + apt_key: + keyserver: keyserver.ubuntu.com + id: 06E85760C0A52C50 + state: present + register: apt_key_result + retries: 3 + until: apt_key_result is succeeded + loop: + +# Add the repository into source list +- name: Configure unifi repository + apt_repository: + repo: "{{ item }}" + state: present + loop: + - deb http://www.ui.com/downloads/unifi/debian stable ubiquiti + +- name: Install unifi + apt: + update_cache: true + name: unifi + state: present + register: apt_result + retries: 3 + until: apt_result is succeeded diff --git a/unifi.yml b/unifi.yml new file mode 100644 index 0000000..3eb9c7d --- /dev/null +++ b/unifi.yml @@ -0,0 +1,5 @@ +--- +# Deploy Unifi Controller +- hosts: unifi-pacaterie.adm.auro.re + roles: + - unifi-controller