Skip to content

Instantly share code, notes, and snippets.

@oakinogundeji
Last active April 15, 2023 22:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
ec2 user data for hidden node of mongodb replica set
#!/bin/bash
sudo apt update && sudo apt upgrade
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt install -y build-essential git nodejs ansible python3-boto3 zip unzip
git clone https://<github_username>:<github_pat>@github.com/<github_username>/<repo_name>.git /home/ubuntu/<repo_name>
cd <repo_name>/<optional_sub_directory>
ansible-playbook <optional_path_to/>hidden-node.yml --extra-vars "BACKUP_BUCKET=your_s3_bucket"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment