Add unifi role
And server.
This commit is contained in:
parent
73555d2fd7
commit
e95603fda9
4 changed files with 72 additions and 0 deletions
35
roles/unifi/tasks/main.yml
Normal file
35
roles/unifi/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
- name: Add MongoDB repository
|
||||
deb822_repository:
|
||||
name: mongodb
|
||||
uris: http://repo.mongodb.org/apt/debian
|
||||
suites: '{{ ansible_distribution_release }}/mongodb-org/{{ mongodb_version }}'
|
||||
components: main
|
||||
architectures: amd64
|
||||
signed_by: https://www.mongodb.org/static/pgp/server-{{ mongodb_version }}.asc
|
||||
|
||||
- name: Add Unifi repository
|
||||
deb822_repository:
|
||||
name: unifi
|
||||
uris: https://www.ui.com/downloads/unifi/debian
|
||||
suites: stable
|
||||
components: ubiquiti
|
||||
architectures: amd64
|
||||
signed_by: https://dl.ui.com/unifi/unifi-repo.gpg
|
||||
|
||||
- name: Install unifi
|
||||
package:
|
||||
name: unifi
|
||||
update_cache: yes
|
||||
|
||||
- name: Set up nginx site
|
||||
template:
|
||||
dest: '/etc/nginx/sites-available/unifi.conf'
|
||||
src: 'nginx.conf.j2'
|
||||
notify: reload nginx
|
||||
|
||||
- name: Enable nginx site
|
||||
file:
|
||||
dest: /etc/nginx/sites-enabled/unifi.conf
|
||||
src: /etc/nginx/sites-available/unifi.conf
|
||||
state: link
|
||||
notify: reload nginx
|
Loading…
Add table
Add a link
Reference in a new issue