This project automates the creation of a remote desktop server using Ansible, Terraform, and RustDesk.
After the infrastructure is set up, the ansible_server installs Ansible, configures the inventory, and runs a playbook to install Docker and start Docker containers on the rustdesk_server.
-
Configure AWS Credentials: Ensure your AWS credentials are configured using the AWS CLI
-
Initialize and Apply Terraform: Navigate to the
terraformdirectory, initialize Terraform, and apply the configuration to provision the infrastructure. -
Configure SSH Key Pair: SSH to
ansible-server. Copy the keypair to `~/.ssh/your-keypair.pem and make sure to change the mode for keypair to read-only.
chmod 400 ~/.ssh/your-keypair.pem
Start and switch ssh-agent to bash and add the keypair to ssh-agent
ssh-agent
ssh-agent bash
ssh-add ~/.ssh/your-keypair.pem
make sure cd into the ~/ansible
ansible all -i inventory -m ping
ensure 2 files playbook.yml and docker-compose.yml in the /ansible folder are copied to path: ~/ansible
then run ansible playbook
ansible-playbook -i inventory playbook.yml