{"id":44317343,"url":"https://github.com/basher83/do_env0_test","last_synced_at":"2026-02-11T05:15:25.744Z","repository":{"id":291176909,"uuid":"976834280","full_name":"basher83/do_env0_test","owner":"basher83","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-02T21:46:54.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T22:27:30.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basher83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-02T20:51:15.000Z","updated_at":"2025-05-02T21:46:57.000Z","dependencies_parsed_at":"2025-05-02T22:28:18.279Z","dependency_job_id":"415f95c4-0cd9-48ed-9136-bf77361619dc","html_url":"https://github.com/basher83/do_env0_test","commit_stats":null,"previous_names":["basher83/do_env0_test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basher83/do_env0_test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fdo_env0_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fdo_env0_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fdo_env0_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fdo_env0_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basher83","download_url":"https://codeload.github.com/basher83/do_env0_test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fdo_env0_test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-11T05:15:25.660Z","updated_at":"2026-02-11T05:15:25.732Z","avatar_url":"https://github.com/basher83.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# do_env0_test\n\nThis repository demonstrates deploying a DigitalOcean droplet using Terraform, configuring it with Ansible, and managing the workflow with env0.\n\n## Overview\n- **Infrastructure as Code:** Uses Terraform to provision a DigitalOcean droplet.\n- **Configuration Management:** Uses Ansible to configure the droplet after creation.\n- **Orchestration:** All steps are managed and automated via env0.\n\n## Prerequisites\n- DigitalOcean account and API token\n- SSH key pair (public and private)\n- env0 account\n\n## Setup\n1. **Configure env0 Variables:**\n   - `do_token`: Your DigitalOcean API token (Sensitive)\n   - `STAGING_PUBLIC_KEY`: The public SSH key to be injected into the droplet (Sensitive)\n   - `STAGING_PRIVATE_KEY`: The private SSH key for Ansible to connect (Sensitive)\n\n2. **Deploy:**\n   - env0 will run the workflow defined in `env0.yml`:\n     - Provisions a droplet with Terraform (`main.tf`)\n     - Injects the public SSH key via cloud-init (`digitalocean.tftpl`)\n     - Runs Ansible playbook (`configure.yml`) to configure the droplet\n\n## File Structure\n- `main.tf`: Terraform configuration for DigitalOcean droplet\n- `digitalocean.tftpl`: Cloud-init template for initial droplet setup\n- `configure.yml`: Ansible playbook for post-provisioning configuration\n- `env0.yml`: env0 workflow definition\n- `files/aliases.zsh`: Custom shell aliases for the droplet\n\n## Test Docker Container Deployment\n\nAs part of the Ansible configuration, a test nginx Docker container is deployed to the droplet and exposed on port 8080. You can verify the deployment in two ways:\n\n1. **Check Ansible Output:**\n   - The Ansible playbook prints the nginx homepage content to the output after deployment.\n\n2. **Access via Browser:**\n   - Visit `http://\u003cdroplet_ip\u003e:8080` in your browser to see the nginx welcome page.\n\nThis confirms that Docker is running and the container was successfully deployed by Ansible.\n\n## Notes\n- This is a test repository for learning and experimenting with env0, Terraform, and Ansible.\n- SSH key handling is managed via env0 variables for security and flexibility.\n\n## References\n- [env0 Documentation](https://docs.env0.com/)\n- [Terraform DigitalOcean Provider](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs)\n- [Ansible Documentation](https://docs.ansible.com/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasher83%2Fdo_env0_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasher83%2Fdo_env0_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasher83%2Fdo_env0_test/lists"}