Skip to content

Instantly share code, notes, and snippets.

View rajannpatel's full-sized avatar
🍄
1UP

Rajan Patel rajannpatel

🍄
1UP
View GitHub Profile
@rajannpatel
rajannpatel / landscape_quickstart_in_LXD_via_cloud_init.sh
Last active October 7, 2023 18:34
Install Landscape Quickstart using cloud-init.yaml into a LXD container
## cloud-init steps
# Save the cloud-init-quickstart.yaml file as cloud-init.yaml
curl -o cloud-init.yaml https://raw.githubusercontent.com/canonical/landscape-scripts/main/provisioning/cloud-init-quickstart.yaml
# Define your VARIABLES
# EMAIL: Your email address to share with LetsEncrypt for your SSL Certificate
# PRO_TOKEN: Ubuntu Pro token from: https://ubuntu.com/pro/dashboard (not needed for Ubuntu Pro instances on Azure, AWS, or Google Cloud)
# HOSTNAME: subdomain of FQDN (e.g. `server` for `server.yourdomain.com`)
@rajannpatel
rajannpatel / landscape_client.yaml
Last active August 23, 2023 21:12
Install Landscape Client
---
- name: Install Landscape Client
hosts: your_target_hosts
become: yes
vars:
landscape_account: "YOUR_LANDSCAPE_ACCOUNT_NAME"
landscape_computer: "YOUR_LANDSCAPE_COMPUTER_TITLE"
tasks:
- name: Update apt cache
apt:
@rajannpatel
rajannpatel / backup.sh
Last active October 16, 2019 01:20
rsync to google cloud storage with gsutil in a short and simple bash script, which takes an array of local directories as the source
#!/usr/bin/env bash
bucket=name-of-your-bucket
dirs=(
~/relative/path
../relative/path2
/absolute/path/
/Volumes/Macintosh HD/full/absolute/path
)