Browse Source

unifi!

master
3moon 6 years ago
parent
commit
4cde35f362
6 changed files with 35 additions and 10 deletions
  1. +0
    -1
      bootstrap.retry
  2. +5
    -5
      roles/rpi-base/tasks/user.yml
  3. +0
    -1
      roles/unifi/defaults/default.yml
  4. +1
    -0
      roles/unifi/defaults/main.yml
  5. +5
    -0
      roles/unifi/handlers/main.yml
  6. +24
    -3
      roles/unifi/tasks/main.yml

+ 0
- 1
bootstrap.retry View File

@ -1 +0,0 @@
aux.local

+ 5
- 5
roles/rpi-base/tasks/user.yml View File

@ -1,8 +1,8 @@
# - name: USER | change password
# user:
# name: pi
# password: "{{ lookup('passwordstore', 'infra/machine/pi@' + ansible_hostname + ' create=true length=20')
# | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
- name: USER | change password
user:
name: pi
password: "{{ lookup('passwordstore', 'infra/machine/pi@' + ansible_hostname + ' create=true length=20')
| password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
- name: USER | add authorized SSH key(s)
authorized_key:


+ 0
- 1
roles/unifi/defaults/default.yml View File

@ -1 +0,0 @@
unifi_channel=stable

+ 1
- 0
roles/unifi/defaults/main.yml View File

@ -0,0 +1 @@
unifi_channel: stable

+ 5
- 0
roles/unifi/handlers/main.yml View File

@ -0,0 +1,5 @@
- name: restart unifi
service:
name: unifi
state: restarted
become: yes

+ 24
- 3
roles/unifi/tasks/main.yml View File

@ -1,7 +1,28 @@
- apt_key:
url: https://dl.ubnt.com/unifi/unifi-repo.gpg
state: present
become: yes
- apt_repository:
repo: "deb http://www.ubnt.com/downloads/unifi/debian {{unifi_channel}} ubiquiti"
state: present
become: yes
- apt_key:
url: https://dl.ubnt.com/unifi/unifi-repo.gpg
state: present
- name: install java packages
apt:
name: openjdk-8-jre-headless
state: present
update_cache: yes
become: yes
- name: install unifi-controller packages
apt:
name: unifi
state: present
become: yes
notify:
- restart unifi
# - name: disable default unifi mongodb
# lineinfile:

Loading…
Cancel
Save