Skip to content

Terraform+Ansible for automate server in DigitalOcean

Notifications You must be signed in to change notification settings

amaudy/do-devbox

Repository files navigation

Setup Development Machine

Automate create Linux users, copy private key and install Docker/Docker compose at remote server.

Purpose for quick setup development box.

How to use this repository?

After clone to your machine

  • Go get DigitalOcean Token
  • Install terraform at local computer
  • Install ansible at local computer
  • Create Terraform variables cp terraform.tfvars.example terraform.tfvars and edit the proper values

Prepare configuration

Create default.yaml

cp ansible/vars/default.yml.example ansible/vars/default.yml

Example:

ansible/vars/default.yml

Then create folder same as user in default.yml and put the private key to this folder

Example:

developer-keys

Crete Terraform configuration

cp terraform.tfvars.example terraform.tfvars

Edit to proper values then go to next step

Example:

developer-keys

Run the terraform

terraform init

and

terraform apply

or

terraform apply --auto-approve

Destroy resources

terraform destory

or

terraform destory --auto-approve

References

About

Terraform+Ansible for automate server in DigitalOcean

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published