{"id":29284873,"url":"https://github.com/andvarfolomeev/ansible-wg","last_synced_at":"2026-04-13T15:33:54.764Z","repository":{"id":302950008,"uuid":"1014030059","full_name":"andvarfolomeev/ansible-wg","owner":"andvarfolomeev","description":"A simple Ansible playbook to set up a WireGuard VPN server and manage client configurations.","archived":false,"fork":false,"pushed_at":"2025-07-04T23:09:36.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T17:26:33.268Z","etag":null,"topics":["ansible","ansible-role","wireguard","wireguard-selfhost","wireguard-setup"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/andvarfolomeev.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-07-04T23:02:06.000Z","updated_at":"2025-07-04T23:12:50.000Z","dependencies_parsed_at":"2025-07-05T00:23:42.033Z","dependency_job_id":null,"html_url":"https://github.com/andvarfolomeev/ansible-wg","commit_stats":null,"previous_names":["andvarfolomeev/ansible-wg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andvarfolomeev/ansible-wg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvarfolomeev%2Fansible-wg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvarfolomeev%2Fansible-wg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvarfolomeev%2Fansible-wg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvarfolomeev%2Fansible-wg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andvarfolomeev","download_url":"https://codeload.github.com/andvarfolomeev/ansible-wg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvarfolomeev%2Fansible-wg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"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","ansible-role","wireguard","wireguard-selfhost","wireguard-setup"],"created_at":"2025-07-05T22:01:55.369Z","updated_at":"2026-04-13T15:33:54.757Z","avatar_url":"https://github.com/andvarfolomeev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible WireGuard Configuration\n\nA simple Ansible playbook to set up a WireGuard VPN server and manage client configurations.\n\n## Overview\n\nThis project allows you to:\n- Configure a WireGuard VPN server\n- Manage client peers in a single configuration file\n- Generate client configurations automatically\n\n## Requirements\n\n- Ansible 2.9+\n- Target server with Debian 12\n- Python 3.x\n\n## Quick Start\n\n1. Clone this repository\n2. Edit `peers.yml` to configure your server and clients\n3. Run the playbook:\n\n```bash\nansible-playbook -i inventory.ini setup-wireguard.yml\n```\n\n## Configuration\n\n### Server Configuration\n\nEdit `peers.yml` to configure your WireGuard server:\n\n```yaml\ninterface:\n  address: 10.0.0.1/24       # Server VPN IP address\n  listen_port: 51820          # WireGuard port\n  private_key: \u003cserver_private_key\u003e\n  public_key: \u003cserver_public_key\u003e\n  endpoint: \u003cyour_public_ip\u003e:51820\n```\n\n### Client Peers Configuration\n\nAdd client peers to the `peers.yml` file:\n\n```yaml\npeers:\n  - name: device_name         # Descriptive name (e.g., laptop, phone)\n    private_key: \u003cprivate_key\u003e\n    public_key: \u003cpublic_key\u003e\n    allowed_ips: 10.0.0.2/32  # Unique IP for each client\n```\n\nEach peer needs:\n- A unique name (used for configuration file names)\n- WireGuard keys (generate with `wg genkey` and `wg pubkey`)\n- A unique IP address within your VPN subnet\n\n## Testing with Docker\n\nA Dockerfile and example inventory are included for testing:\n\n1. Build the test container:\n```bash\ndocker build -t wg-test .\n```\n\n2. Run the container:\n```bash\ndocker run -d -p 2222:22 --privileged --name wg-test wg-test\n```\n\n3. Run the playbook with the Docker inventory:\n```bash\nansible-playbook -i inventory_docker_example.ini setup-wireguard.yml\n```\n\n## Security Notes\n\n- Never share your private keys\n- Generate new keys for each device\n- Keep your `peers.yml` file secure\n- Consider using Ansible Vault for production deployments\n\n## Generated Client Configurations\n\nClient configuration files will be generated in the `./clients` directory.\nThese files can be directly imported into WireGuard clients on various platforms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandvarfolomeev%2Fansible-wg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandvarfolomeev%2Fansible-wg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandvarfolomeev%2Fansible-wg/lists"}