{"id":21070676,"url":"https://github.com/pyronear/ansible-role-openvpn","last_synced_at":"2026-02-22T00:40:18.454Z","repository":{"id":263648220,"uuid":"883661068","full_name":"pyronear/ansible-role-openvpn","owner":"pyronear","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-02T13:28:56.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T18:36:35.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyronear.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":"2024-11-05T11:05:14.000Z","updated_at":"2024-12-02T13:28:57.000Z","dependencies_parsed_at":"2024-11-19T17:51:53.833Z","dependency_job_id":"dde39d16-1f2a-43a9-8e35-23a6d23196e2","html_url":"https://github.com/pyronear/ansible-role-openvpn","commit_stats":null,"previous_names":["pyronear/ansible-role-openvpn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyronear/ansible-role-openvpn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronear%2Fansible-role-openvpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronear%2Fansible-role-openvpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronear%2Fansible-role-openvpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronear%2Fansible-role-openvpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyronear","download_url":"https://codeload.github.com/pyronear/ansible-role-openvpn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyronear%2Fansible-role-openvpn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29701096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2024-11-19T18:47:47.647Z","updated_at":"2026-02-22T00:40:18.438Z","avatar_url":"https://github.com/pyronear.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: OpenVPN\n\nThis Ansible role allows you to install and configure both an **OpenVPN server** and an **OpenVPN client**.\n\n\n## Requirements\n\nThe OpenVPN server requires the following Python dependencies to be installed on the target machine:\n- `requests`\n- `packaging`\n- `pexpect`\n\nYou can install these dependencies using pip:\n\n```bash\npip install requests packaging pexpect\n```\n\nThis role relies also on the Docker image [`kylemanna/openvpn`](https://hub.docker.com/r/kylemanna/openvpn) to set up the OpenVPN server. Ensure that Docker is installed and properly configured on the server where the role will run.\n\n## Reboot the machine \u0026 final test\n\nYou will need to reboot the client after the installation :\n```\n- name: Unconditionally reboot the machine with all defaults\n  ansible.builtin.reboot:\n```\n\nOpenvpn is configured to redirect all the trafic through the VPN so after the reboot, you will need to be connected to the VPN to be able to connect to your machine.\n\nIf you want to be sure that everything has worked, once connected to the VPN, you can launch the tasks check_ifcongif.yml.\n\n## Role Variables\n\nThe following variables must be defined for the role to work. For sensitive values, it is recommended to use **Ansible Vault** in production environments.\n\n| Variable                      | Description                                  | Required | Example                  |\n|-------------------------------|----------------------------------------------|----------|--------------------------|\n| `openvpn_ca_password`         | Password for the Certificate Authority (CA) | Yes      | `\"securepassword123\"`    |\n| `openvpn_client_password`     | Password for the OpenVPN client             | Yes      | `\"anothersecurepassword\"`|\n| `openvpn_server_dns`          | DNS for the OpenVPN server                  | Yes      | `\"vpn.example.com\"`      |\n| `openvpn_server_ansible_host` | Hostname or IP address of the OpenVPN server| Yes      | `\"192.168.1.100\"`        |\n| `dockerhub_username` | Your DockerHub Username | No      | `\"myname\"`        |\n| `dockerhub_password` | Your DockerHub Password| No      | `\"securepassword1234\"`        |\n\n**Example Playbook:**\n```yaml\n- hosts: openvpn_server\n  become: true\n  vars:\n    openvpn_ca_password: \"your_ca_password\"  # Use Ansible Vault in production\n    openvpn_client_password: \"your_client_password\"  # Use Ansible Vault in production\n    openvpn_server_dns: \"vpn.example.com\"\n    openvpn_server_ansible_host: \"192.168.1.100\"\n  roles:\n    - pyronear.openvpn\n```\n\n## Local Testing with Molecule\n\nYou can test this role locally using [Molecule](https://molecule.readthedocs.io/en/latest/). Molecule automates the process of creating test environments (e.g., Docker containers), applying the role, and validating its idempotence.\n\n### Setup\n\n1. Install the required dependencies:\n   ```bash\n   pip install molecule[docker]\n   ```\n\n2. Run the tests:\n   ```bash\n   molecule test\n   ```\n\n### Molecule Configuration\n\nThe `molecule` directory contains all the configurations needed to test this role. Specifically:\n- The OpenVPN server and client are tested in separate containers.\n- Python dependencies and any additional setup are handled automatically during the Molecule execution.\n\n## License\n\n See the [LICENSE](LICENSE) file for details.\n\n## Author Information\n\nThis role was created by **[Ronan SY/Pyronear]**. Contributions and feedback are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyronear%2Fansible-role-openvpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyronear%2Fansible-role-openvpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyronear%2Fansible-role-openvpn/lists"}