{"id":19611428,"url":"https://github.com/verschlimmbesserer/wireguard","last_synced_at":"2026-05-14T11:33:05.784Z","repository":{"id":251684482,"uuid":"636876364","full_name":"verschlimmbesserer/wireguard","owner":"verschlimmbesserer","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-05T03:28:07.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-09T10:17:46.263Z","etag":null,"topics":["ansible","ansible-role","role"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verschlimmbesserer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-05-05T21:31:06.000Z","updated_at":"2024-08-05T03:28:11.000Z","dependencies_parsed_at":"2024-08-05T04:09:27.704Z","dependency_job_id":null,"html_url":"https://github.com/verschlimmbesserer/wireguard","commit_stats":null,"previous_names":["verschlimmbesserer/wireguard"],"tags_count":0,"template":false,"template_full_name":"verschlimmbesserer/roles-template-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verschlimmbesserer%2Fwireguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verschlimmbesserer%2Fwireguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verschlimmbesserer%2Fwireguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verschlimmbesserer%2Fwireguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verschlimmbesserer","download_url":"https://codeload.github.com/verschlimmbesserer/wireguard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240900175,"owners_count":19875510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","role"],"created_at":"2024-11-11T10:39:23.914Z","updated_at":"2026-05-14T11:33:00.552Z","avatar_url":"https://github.com/verschlimmbesserer.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"Wireguard\n=========\n\nThis role installs `wireguard` and generates the nessesary keys as the configurations as well.\nIt uses the  `ansible.builtin.slurp` collection to pickup the generated private and public keys. If the files exists or after the got generated. It is also possible to use a pre generated Private Key in the interface dictionary under the wireguard variable.\n\nRequirements\n------------\n\nAny pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.\n\nRole Variables\n--------------\n\n|name|type|function|\n|---|---|---|\n|`wireguard_public_key_prefix:`| str | prefix for the wireguard public key|\n| `wireguard_key_filename:`| str | name used for the key filenames, when not set will default to `{{ ansible_hostname }}`|\n|`wireguard_create_keys:`| bool | By default Ansible will attempt to creaet the wireguard private and public key. |\n|`wireguard`| dict | contains the configuration for the `wg0.conf` with the keys `interface` and `peers` which contains each `peer` as dictionary.|\n\nExample Variables Configuration\n------------\n\nSite 2 Site VPN, when both Host are managed by Ansible in the same group.\nHost in the US:\n\n```Yaml\nwireguard_private_key_name: \"{{ ansible_hostname }}\"\nwireguard_create_keys: true\n\nwireguard:\n  interface:\n    ListenPort: 51820\n    Address: 10.10.9.2/32\n    PostUp: iptables -A FORWARD -i wg0 -j ACCEPT\n    PostDown: iptables -D FORWARD -i wg0 -j ACCEPT\n  peers:\n    wg01-euro:\n      PersistentKeepalive: 25\n      Endpoint: \"{{ hostvars['wg01-euro']['ansible_default_ipv4.address'] }}:51820\"\n      PublicKey: \"{{ hostvars['wg01-euro']['wg_public_key']}}\"\n      AllowedIPs: 10.10.0.0/24,10.10.9.0/30\n```\n\nHost in Europe:\n```Yaml\nwireguard_private_key_name: \"{{ ansible_hostname }}\"\nwireguard_create_keys: true\n\nwireguard:\n  interface:\n    ListenPort: 51820\n    Address: 10.10.9.1/32\n    PostUp: iptables -A FORWARD -i wg0 -j ACCEPT\n    PostDown: iptables -D FORWARD -i wg0 -j ACCEPT\n  peers:\n    wg01-usa:\n      PersistentKeepalive: 25\n      Endpoint: \"{{ hostvars['wg01-usa']['ansible_default_ipv4.address'] }}:51820\"\n      PublicKey: \"{{ hostvars['wg01-usa']['wg_public_key']}}\"\n      AllowedIPs: 10.10.0.0/24,10.10.9.0/30\n```\n\nDependencies\n------------\n\nA list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.\n\nExample Playbook\n----------------\n\nIncluding an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:\n\n    - hosts: servers\n      roles:\n         - { role: username.rolename, x: 42 }\n\nLicense\n-------\n\nGNU General Public License v3.0\n\nAuthor Information\n------------------\n\nAn optional section for the role authors to include contact information, or a website (HTML is not allowed).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverschlimmbesserer%2Fwireguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverschlimmbesserer%2Fwireguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverschlimmbesserer%2Fwireguard/lists"}