Scripts to setup a new machine (Ansible, etc)
sudo apt-get update && sudo apt-get upgrade -y \
&& sudo apt-get install -y software-properties-common curl git build-essential sudo unzip nano fzf \
&& sudo apt-add-repository -y ppa:ansible/ansible \
&& sudo apt-get update && sudo apt-get install -y curl git ansible build-essential \
&& sudo apt-get clean autoclean \
&& sudo apt-get autoremove --yes \
&& sudo sed -i 's/# set bell-style none/set bell-style none/' /etc/inputrc
To generate an SSH key pair, run the following command:
ssh-keygen -t rsa -b 4096Before encrypting the private key, make sure to set the correct file permissions:
sudo chmod 644 /home/alecwang/ssh_files/id_rsa
sudo chmod 644 /home/alecwang/ssh_files/id_rsa.pubTo encrypt the private key using Ansible Vault, use the following command:
ansible-vault encrypt ./ssh_files/id_rsa --ask-vault-passRemember to provide the Ansible Vault password when prompted.
ansible-playbook main.yml./build-dockers.sh && docker run --rm -it new-computer