This file contains 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 | |
# Define an array of roles | |
roles=( | |
"ansible", | |
"copy-private-ssh-key", | |
"copy-public-ssh-key", | |
"password-less-sudo", | |
"ssh-config", | |
"config-local", |
This file contains 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
--- | |
- name: setup command line utilities in ubuntu vm(tested 22.04 & 22.10) | |
hosts: all | |
become: true | |
gather_facts: false | |
vars: | |
user: tabrez | |
home: "/home/{{ user }}" | |
vars_files: |
This file contains 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
ARG OWNER=tabrez | |
ARG BASE_CONTAINER=jupyter/base-notebook | |
FROM $BASE_CONTAINER | |
LABEL maintainer="Tabrez Iqbal <[email protected]>" | |
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
USER root |
This file contains 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
# first cell: mount google drive folder on currect virtual machine of google colab | |
from google.colab import drive | |
drive.mount('/content/gdrive', force_remount=True) | |
%cd /content/gdrive/MyDrive/Colab Notebooks | |
!pwd && ls | |
# upload your private ssh key as id_ed25519 from left sidebar to 'Colab Notebooks' folder | |
# or modify below code to provide it in another way | |
# second cell: need to run on every new Google Colab session before interacting with Github | |
!mkdir -p /root/.ssh |
#cloud-config
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTR8xPD+LB3PajsMmKcJFH/1m7byXOdH1skB8EmgnlaHdh9kyg6/XnsB/JzCzn1LtwKfzxHIz7kIKlB4IaHQHP/OYq76ZesSyyUlRgBw94//7Oq/Xmjun2+HWorMbIxzlswsrlnp/JumERqJqrhWz5rxG4Ex20gqbIJn87dy/gBpK12QiVyZkKToB694K8reL+vLDyhayw5Wgpdl/gjmtD9vT8K+gzSkbSEyL+IFFD/gb2MZqR43/uRDPi6JQyCuLuJtfIuHsC4B9kY7+B2MsSl+tzOqmADBYsOS+V1sJNTqPKrioM5OFwj0lphAwtXtgdsZdU05MK4bZlBp/l/oR3 [email protected] |
This file contains 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
# https://www.ivankrizsan.se/2021/05/16/ansible-and-multipass-virtual-machines/ | |
all: | |
hosts: | |
multipassvm1: | |
ansible_connection: ssh | |
ansible_user: ubuntu | |
ansible_host: <ip of multipass vm> | |
ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none" | |
ansible_private_key: /var/snap/multipass/common/data/multipassd/ssh-keys/id_rsa | |
# or copy your public ssh key to vm and use: |
This file contains 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
version: 1 | |
users: | |
- default | |
- name: tabrez | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
shell: /bin/bash | |
ssh_import_id: | |
- gh:tabrez | |
write_files: | |
- content: | |