{"id":19315200,"url":"https://github.com/bennytaccardi/vpc-automatic-setup","last_synced_at":"2026-02-03T19:02:04.272Z","repository":{"id":261510400,"uuid":"883982630","full_name":"bennytaccardi/vpc-automatic-setup","owner":"bennytaccardi","description":"🔒 Ansible playbook for automated VPC security setup - SSH hardening, user management, and firewall configuration in one command","archived":false,"fork":false,"pushed_at":"2024-11-06T23:08:35.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T09:47:14.263Z","etag":null,"topics":["ansible","vpc-creation"],"latest_commit_sha":null,"homepage":"","language":null,"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/bennytaccardi.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}},"created_at":"2024-11-05T23:26:32.000Z","updated_at":"2024-11-08T23:24:16.000Z","dependencies_parsed_at":"2024-11-06T23:37:14.177Z","dependency_job_id":"5d1e59c5-e0dd-4932-9388-4f49f4eb0e12","html_url":"https://github.com/bennytaccardi/vpc-automatic-setup","commit_stats":null,"previous_names":["bennytaccardi/vpc-automatic-setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bennytaccardi/vpc-automatic-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennytaccardi%2Fvpc-automatic-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennytaccardi%2Fvpc-automatic-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennytaccardi%2Fvpc-automatic-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennytaccardi%2Fvpc-automatic-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bennytaccardi","download_url":"https://codeload.github.com/bennytaccardi/vpc-automatic-setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennytaccardi%2Fvpc-automatic-setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29054041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"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":["ansible","vpc-creation"],"created_at":"2024-11-10T01:05:11.062Z","updated_at":"2026-02-03T19:02:04.257Z","avatar_url":"https://github.com/bennytaccardi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure VPC Setup Ansible Playbook\n\nThis Ansible playbook automates the setup of a secure VPC environment, including SSH configuration, new user creation, and firewall rules.\n\n## Prerequisites\n\n- Ansible installed on your local machine\n- Access to a VPC with root credentials\n- Basic understanding of SSH key pairs\n\n## Setup Steps\n\n### 1. SSH Key Generation\n\nGenerate a new SSH key pair for VPC access:\n\n```bash\nssh-keygen -t rsa -b 4096 -C \"your-email@testemail.com\"\n```\n\nThe keys will be generated in your `~/.ssh` directory:\n\n- Private key: `~/.ssh/id_rsa`\n- Public key: `~/.ssh/id_rsa.pub`\n\n### 2. VPC Key Configuration\n\nCopy your public key to the VPC's authorized keys:\n\n1. Access your VPC using existing credentials\n2. Add the content of `id_rsa.pub` to `~/.ssh/authorized_keys` on the VPC\n\n### 3. Inventory Setup\n\nCreate a hosts file (`hosts`) with your VPC details:\n\n```ini\n[vpc]\n1.1.1.1  # Replace with your VPC's public IP\n```\n\n\u003e **Note**: If you modify the `vpc` group name, ensure you update the corresponding reference in `./personalvpc.yml` under the `hosts` property.\n\n### 4. Configuration\n\n1. Edit `./config.yml` to set your preferred VPC name\n2. Create an encrypted vault file for sensitive information:\n   ```bash\n   ansible-vault create secrets.yml\n   ```\n3. Add the following information to your vault:\n   ```yaml\n   ansible_user: \u003cvpc_root_user\u003e\n   ansible_ssh_private_key_file: \u003cpath_to_vpc_pvt_key\u003e\n   custom_user_password: \u003cnew_user_pwd\u003e\n   custom_user: \u003cnew_user_username\u003e\n   ```\n\n### 5. Execution\n\nRun the playbook with:\n\n```bash\nansible-playbook vpc_playbook.yml --ask-vault-pass\n```\n\nEnter your vault password when prompted.\n\n## What Gets Configured\n\nThe playbook will:\n\n1. Set up SSH configuration\n2. Create a new user with sudo privileges\n3. Configure firewall rules\n4. Generate new SSH keys for the custom user\n5. Create a local directory containing the new SSH keys for future VPC access\n\n## Output\n\nAfter successful execution, you'll find a new directory on your local machine containing:\n\n- Private and public SSH keys for the new user\n- Connection details for accessing the VPC with the new credentials\n\n## Security Notes\n\n- Keep your vault password secure\n- Store the generated SSH private keys safely\n- Never commit sensitive information to version control\n- Regularly rotate SSH keys and passwords\n\n## Troubleshooting\n\nIf you encounter issues:\n\n1. Verify your VPC's IP address is correct in the hosts file\n2. Ensure root SSH access is working before running the playbook\n3. Check that all paths in `secrets.yml` are absolute paths\n4. Verify your vault file is properly encrypted\n\n## Additional Configuration\n\nTo customize the setup further, you can modify:\n\n- `config.yml` for VPC-specific settings\n- `personalvpc.yml` for playbook tasks and roles\n- Firewall rules in the respective task files\n\nFor support or contributions, please open an issue or pull request in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennytaccardi%2Fvpc-automatic-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbennytaccardi%2Fvpc-automatic-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennytaccardi%2Fvpc-automatic-setup/lists"}