Add Unifi Rollout

This commit is contained in:
Stefan Hoffmann 2023-04-13 15:30:53 +02:00
parent c4ec42f668
commit 92b386f75b
Signed by: stefan
GPG Key ID: 8EFC7042BF8D5CDD
5 changed files with 62 additions and 4 deletions

4
host_vars/unifi.yml Normal file
View File

@ -0,0 +1,4 @@
ansible_host: 5.9.220.118
ansible_port: 22
ansible_ssh_user: root
ansible_python_interpreter: /usr/bin/python3

View File

@ -18,6 +18,11 @@ all:
freifunk-supernodes: freifunk-supernodes:
hosts: hosts:
vpn02: vpn02:
service_server:
children:
unifi:
hosts:
unifi:
edge_router: edge_router:
hosts: hosts:
edge1: edge1:

View File

@ -1,12 +1,13 @@
- name: Repo Key Import - name: Add OITC GPG Key
ansible.builtin.shell: curl https://packages.openitcockpit.io/repokey.txt | sudo apt-key add ansible.builtin.get_url:
url: https://packages.openitcockpit.io/repokey.txt
dest: /etc/apt/keyrings/openitcockpit-agent-keyring.asc
- name: Add specified repository into sources list - name: Add specified repository into sources list
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: deb https://packages.openitcockpit.io/openitcockpit-agent/deb/stable deb main repo: "deb [signed-by=/etc/apt/keyrings/openitcockpit-agent-keyring.asc] https://packages.openitcockpit.io/openitcockpit-agent/deb/stable deb main"
state: present state: present
- name: Install OITC-Agent - name: Install OITC-Agent
apt: name={{ item }} state=latest update_cache=yes apt: name={{ item }} state=latest update_cache=yes
with_items: with_items:

View File

@ -0,0 +1,37 @@
---
- name: Install Packages for Unifi APT
ansible.builtin.apt:
name:
- ca-certificates
- apt-transport-https
state: latest
update_cache: yes
- name: Add MongoDB GPG Key
ansible.builtin.get_url:
url: https://www.mongodb.org/static/pgp/server-3.0.asc
dest: /etc/apt/keyrings/mongodb-3.0.asc
- name: Add Unifi GPG Key
ansible.builtin.get_url:
url: https://dl.ui.com/unifi/unifi-repo.gpg
dest: /etc/apt/trusted.gpg.d/unifi-repo.gpg
- name: Add MongoDB repository into sources list using specified filename
ansible.builtin.apt_repository:
repo: "deb [trusted=yes] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse"
state: present
filename: mongodb
- name: Add Unifi repository into sources list using specified filename
ansible.builtin.apt_repository:
repo: deb https://www.ui.com/downloads/unifi/debian stable ubiquiti
state: present
filename: unifi
- name: Install Unifi via APT
ansible.builtin.apt:
name:
- unifi
state: latest
update_cache: yes

11
system-setup-unifi.yml Normal file
View File

@ -0,0 +1,11 @@
# ansible-playbook -i hosts.yml system-setup-unifi.yml
- name: System preperation
hosts: service_server
roles:
#- 00-ubuntu-basic
- 21-install-oitc
- name: Unifi Setup
hosts: unifi
roles:
- 21-unifi