This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
hosts: localhost | |
vars: | |
ansible_user: arturs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
become: yes | |
become_user: arturs | |
tasks: | |
- name: Install curl | |
apt: | |
name: curl | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
hosts: localhost | |
vars: | |
ansible_user: arturs | |
ansible_connection: winrm | |
ansible_winrm_server_cert_validation: ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
tasks: | |
- name: Install Chocolatey packages | |
win_chocolatey: | |
name: | |
- vscode | |
- git | |
- nvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" | |
$file = "$env:temp\ConfigureRemotingForAnsible.ps1" | |
(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file) | |
powershell.exe -ExecutionPolicy ByPass -File $file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit name (example.com), region and size as you wish | |
resource "digitalocean_droplet" "example.com" { | |
image = "ubuntu-20-04-x64" | |
name = "example.com" | |
region = "fra1" | |
size = "s-2vcpu-4gb" | |
private_networking = true | |
ssh_keys = [ | |
var.ssh_fingerprint | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installs microk8s and enables addons: | |
# dns, ingress, helm3 (essential) | |
# dashboard (cluster monitoring) | |
# registry (private Docker registry) | |
# Installs and configures essential helm charts: | |
# external-dns (automating setting of dns records) | |
# cert-manager (automating issuing of https certificates) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates non-root user who can use ssh key auth, edit to your liking. | |
sudo apt install rsync | |
adduser arturs | |
usermod -aG sudo arturs | |
rsync --archive --chown=arturs:arturs ~/.ssh /home/arturs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sets up aliases for microk8s on the server | |
echo "alias m='microk8s' | |
alias k='microk8s kubectl' | |
alias h='microk8s helm3'" >> ~/.bash_aliases | |
source ~/.bash_aliases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ufw default deny incoming | |
ufw default allow outgoing | |
ufw default allow routed | |
ufw allow OpenSSH | |
ufw allow http | |
ufw allow https | |
ufw allow in on cni0 && ufw allow out on cni0 | |
ufw enable |
NewerOlder