Skip to content

Commit

Permalink
Merge pull request #3 from kdpuvvadi/dev
Browse files Browse the repository at this point in the history
from source
  • Loading branch information
kdpuvvadi authored Dec 3, 2022
2 parents bfd5c93 + 028f7b8 commit 9f9b1ce
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
---
extends: default

rules:
line-length:
max: 200
level: warning
4 changes: 4 additions & 0 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
import_tasks: tasks/packages.yml

tasks:

- name: Install mango
import_tasks: tasks/mango.yml

- name: Install unifi
import_tasks: tasks/unifi.yml
when: unifi_preset.rc == 1
31 changes: 31 additions & 0 deletions tasks/mango.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

- name: Add mangodb 3.4 apt key
ansible.builtin.apt_key:
url: https://www.mongodb.org/static/pgp/server-3.4.asc
state: present

- name: Add mangodb repo
ansible.builtin.apt_repository:
repo: deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
state: present
filename: mongodb-org-3.4.list

- name: Run apt cache update & upgrade
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
state: latest

- name: Run apt install packages
ansible.builtin.apt:
name:
- mongodb
state: present
update_cache: true

- name: Ensure mongo is running
ansible.builtin.service:
name: mongodb
state: started
enabled: true
24 changes: 2 additions & 22 deletions tasks/unifi.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
---

- name: Add unifi apt key
ansible.builtin.apt_key:
keyserver: keyserver.ubuntu.com
id: 06E85760C0A52C50

- name: Add unifi repo
ansible.builtin.apt_repository:
repo: deb https://www.ui.com/downloads/unifi/debian stable ubiquiti
state: present
filename: 100-ubnt-unifi

- name: Run apt cache update & upgrade
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
state: latest

- name: Install unifi
- name: Install unifi from url
ansible.builtin.apt:
name:
- unifi
state: present
update_cache: true
deb: " {{ unifi_url }} "

- name: Reboot
ansible.builtin.reboot:
Expand Down
1 change: 1 addition & 0 deletions vars.yml.j2
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
config_dir: '/home/ansible/unifi/'
unifi_url: https://dl.ui.com/unifi/7.3.76/unifi_sysvinit_all.deb

0 comments on commit 9f9b1ce

Please sign in to comment.