47 lines
987 B
YAML
47 lines
987 B
YAML
---
|
|
# 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
|
|
|
|
- name: Indicate role in motd
|
|
template:
|
|
src: update-motd.d/05-service.j2
|
|
dest: /etc/update-motd.d/05-unifi-controller
|
|
mode: 0755
|