initial deployment
This commit is contained in:
51
ansible/provisoning/ubuntu/install-docker.yaml
Normal file
51
ansible/provisoning/ubuntu/install-docker.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
become: yes
|
||||
tasks:
|
||||
|
||||
# Install Docker
|
||||
# --
|
||||
#
|
||||
- name: install prerequisites
|
||||
apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gnupg-agent
|
||||
- software-properties-common
|
||||
update_cache: yes
|
||||
|
||||
- name: add apt-key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
|
||||
- name: add docker repo
|
||||
apt_repository:
|
||||
repo: deb https://download.docker.com/linux/ubuntu focal stable
|
||||
|
||||
- name: install docker
|
||||
apt:
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
update_cache: yes
|
||||
|
||||
- name: add userpermissions
|
||||
shell: "usermod -aG docker {{ lookup('env','USER') }}"
|
||||
|
||||
# Installs Docker SDK
|
||||
# --
|
||||
#
|
||||
- name: install python package manager
|
||||
apt:
|
||||
name: python3-pip
|
||||
|
||||
- name: install python sdk
|
||||
become_user: "{{ lookup('env','USER') }}"
|
||||
pip:
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
||||
19
ansible/provisoning/ubuntu/install-microk8s.yaml
Normal file
19
ansible/provisoning/ubuntu/install-microk8s.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
become: yes
|
||||
tasks:
|
||||
|
||||
# Installs Microk8s
|
||||
# --
|
||||
#
|
||||
- name: install microk8s
|
||||
snap:
|
||||
classic: yes
|
||||
name: microk8s
|
||||
|
||||
# Sets User Permissions
|
||||
# --
|
||||
#
|
||||
- name: add userpermissions
|
||||
shell: "usermod -aG microk8s {{ lookup('env','USER') }}"
|
||||
17
ansible/provisoning/ubuntu/install-wireguard.yaml
Normal file
17
ansible/provisoning/ubuntu/install-wireguard.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- hosts: all
|
||||
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: Install WireGuard
|
||||
apt:
|
||||
name: wireguard
|
||||
update_cache: yes
|
||||
|
||||
- name: Generate Private and Public Key Pair
|
||||
shell: |
|
||||
wg genkey | tee privatekey | wg pubkey > publickey
|
||||
|
||||
chmod 0400 privatekey
|
||||
chmod 0400 publickey
|
||||
Reference in New Issue
Block a user