├── .ansible-lint ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md ├── settings.yml └── workflows │ ├── galaxy.yml │ ├── molecule.yml │ ├── requirements2png.yml │ └── todo.yml ├── .gitignore ├── .gitlab-ci.yml ├── .pre-commit-config.yaml ├── .yamllint ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── defaults └── main.yml ├── handlers └── main.yml ├── meta ├── main.yml └── preferences.yml ├── molecule └── default │ ├── converge.yml │ ├── molecule.yml │ ├── prepare.yml │ └── verify.yml ├── requirements.txt ├── requirements.yml ├── tasks ├── assert.yml ├── client.yml ├── main.yml └── server.yml ├── tox.ini └── vars └── main.yml /.ansible-lint: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | exclude_paths: 6 | - meta/preferences.yml 7 | - molecule/default/prepare.yml 8 | - molecule/default/converge.yml 9 | - molecule/default/verify.yml 10 | - molecule/default/collections.yml 11 | - .tox 12 | - .cache 13 | - .github 14 | - requirements.yml 15 | 16 | enable_list: 17 | - name[prefix] 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | --- 2 | github: robertdebock 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help me improve 4 | 5 | --- 6 | 7 | # Describe the bug 8 | 9 | A clear and concise description of what the bug is. 10 | 11 | ## Playbook 12 | 13 | Please paste the playbook you are using. (Consider `requirements.yml` and 14 | optionally the command you've invoked.) 15 | 16 | ```yaml 17 | --- 18 | YOUR PLAYBOOK HERE 19 | ``` 20 | 21 | ## Output 22 | 23 | Show at least the error, possible related output, maybe just all the output. 24 | 25 | ## Environment 26 | 27 | - Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) 28 | - Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) 29 | - Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) 30 | 31 | Please consider [sponsoring me](https://github.com/sponsors/robertdebock). 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | # Proposed feature 8 | 9 | A clear and concise description of what you want to happen. 10 | 11 | ## Rationale 12 | 13 | Why is this feature required? 14 | 15 | ## Additional context 16 | 17 | Add any other context about the feature request here. 18 | 19 | Please consider [sponsoring me](https://github.com/sponsors/robertdebock). 20 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Pull request 3 | about: Describe the proposed change 4 | 5 | --- 6 | 7 | **Describe the change** 8 | A clear and concise description of what the pull request is. 9 | 10 | **Testing** 11 | In case a feature was added, how were tests performed? 12 | -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | repository: 6 | description: Install and configure DSVPN on your system. 7 | homepage: https://robertdebock.nl/ 8 | topics: dsvpn, networking, ansible, molecule, tox, playbook 9 | -------------------------------------------------------------------------------- /.github/workflows/galaxy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | 6 | name: Release to Ansible Galaxy 7 | 8 | on: 9 | release: 10 | types: [created, edited, published, released] 11 | jobs: 12 | release: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: galaxy 16 | uses: robertdebock/galaxy-action@1.2.1 17 | with: 18 | galaxy_api_key: ${{ secrets.galaxy_api_key }} 19 | -------------------------------------------------------------------------------- /.github/workflows/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | 6 | name: Ansible Molecule 7 | 8 | on: 9 | push: 10 | branches: 11 | - master 12 | pull_request: 13 | schedule: 14 | - cron: '7 4 4 * *' 15 | 16 | jobs: 17 | lint: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: checkout 21 | uses: actions/checkout@v4 22 | - name: ansible-lint 23 | uses: ansible-community/ansible-lint-action@main 24 | 25 | molecule: 26 | needs: 27 | - lint 28 | runs-on: ubuntu-latest 29 | strategy: 30 | fail-fast: false 31 | matrix: 32 | distro: 33 | - image: "enterpriselinux" 34 | tag: "latest" 35 | - image: "debian" 36 | tag: "latest" 37 | - image: "debian" 38 | tag: "bullseye" 39 | - image: "fedora" 40 | tag: "40" 41 | - image: "fedora" 42 | tag: "latest" 43 | - image: "ubuntu" 44 | tag: "latest" 45 | - image: "ubuntu" 46 | tag: "jammy" 47 | - image: "ubuntu" 48 | tag: "focal" 49 | steps: 50 | - name: checkout 51 | uses: actions/checkout@v4 52 | with: 53 | path: ansible-role-dsvpn 54 | 55 | - name: Set up Python 56 | uses: actions/setup-python@v5 57 | with: 58 | python-version: "3.13" 59 | 60 | - name: Configure Docker for systemd 61 | run: | 62 | sudo mkdir -p /etc/docker 63 | echo '{ 64 | "features": { 65 | "buildkit": true 66 | }, 67 | "exec-opts": ["native.cgroupdriver=systemd"] 68 | }' | sudo tee /etc/docker/daemon.json 69 | sudo systemctl restart docker || true 70 | 71 | - name: Install Docker 72 | uses: docker/setup-buildx-action@v3 73 | 74 | - name: Install dependencies 75 | run: | 76 | python -m pip install --upgrade pip 77 | pip install ansible-lint molecule molecule-plugins[docker] ansible-core 78 | if [ -f ansible-role-dsvpn/requirements.txt ]; then pip install -r ansible-role-dsvpn/requirements.txt; fi 79 | if [ -f ansible-role-dsvpn/requirements.yml ]; then ansible-galaxy install -r ansible-role-dsvpn/requirements.yml; fi 80 | 81 | # Create proper role directory structure for molecule 82 | mkdir -p ~/.ansible/roles 83 | ln -s ${GITHUB_WORKSPACE}/ansible-role-dsvpn ~/.ansible/roles/robertdebock.dsvpn 84 | 85 | - name: Test with molecule 86 | run: | 87 | cd ansible-role-dsvpn 88 | molecule test 89 | env: 90 | PY_COLORS: 1 91 | ANSIBLE_FORCE_COLOR: 1 92 | ANSIBLE_ROLES_PATH: ~/.ansible/roles:${GITHUB_WORKSPACE}/ansible-role-dsvpn 93 | image: ${{ matrix.distro.image }} 94 | tag: ${{ matrix.distro.tag }} 95 | -------------------------------------------------------------------------------- /.github/workflows/requirements2png.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | 6 | on: 7 | - push 8 | 9 | name: Ansible Graphviz 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | permissions: 15 | contents: write 16 | steps: 17 | - name: checkout 18 | uses: actions/checkout@v4 19 | with: 20 | path: ${{ github.repository }} 21 | - name: create png 22 | uses: robertdebock/graphviz-action@1.0.7 23 | - name: Commit files 24 | run: | 25 | cd ${{ github.repository }} 26 | git config --local user.email "github-actions[bot]@users.noreply.github.com" 27 | git config --local user.name "github-actions[bot]" 28 | git add requirements.dot requirements.png 29 | git commit -m "Add generated files" 30 | - name: save to png branch 31 | uses: ad-m/github-push-action@master 32 | with: 33 | directory: ${{ github.repository }} 34 | force: true 35 | branch: png 36 | -------------------------------------------------------------------------------- /.github/workflows/todo.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | 6 | name: "TODO 2 Issue" 7 | 8 | on: 9 | push: 10 | 11 | jobs: 12 | build: 13 | runs-on: "ubuntu-latest" 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: "TODO to Issue" 17 | uses: "alstr/todo-to-issue-action@v4" 18 | id: "todo" 19 | with: 20 | TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .molecule 2 | *.log 3 | *.swp 4 | .tox 5 | .cache 6 | .DS_Store 7 | .ansible 8 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | variables: 4 | DEBIAN_FRONTEND: noninteractive 5 | 6 | molecule: 7 | image: python:3.13 8 | script: 9 | - apt-get update -qq 10 | - apt-get -y -qq install yamllint docker.io 11 | # Configure Docker for systemd 12 | - mkdir -p /etc/docker 13 | - echo '{"features":{"buildkit":true},"exec-opts":["native.cgroupdriver=systemd"]}' > /etc/docker/daemon.json 14 | - service docker restart || true 15 | # Install dependencies and run tests 16 | - pip install --no-cache-dir ansible-lint molecule molecule-plugins[docker] ansible-core 17 | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 18 | - if [ -f requirements.yml ]; then ansible-galaxy install -r requirements.yml; fi 19 | # Create proper role directory structure for molecule 20 | - mkdir -p ~/.ansible/roles 21 | - ln -s $CI_PROJECT_DIR ~/.ansible/roles/robertdebock.dsvpn 22 | # Run molecule tests 23 | - cd $CI_PROJECT_DIR 24 | - ANSIBLE_ROLES_PATH=~/.ansible/roles:$CI_PROJECT_DIR molecule test 25 | rules: 26 | - if: $CI_COMMIT_REF_NAME == "master" 27 | parallel: 28 | matrix: 29 | - image: "enterpriselinux" 30 | tag: "latest" 31 | - image: "debian" 32 | tag: "latest" 33 | - image: "debian" 34 | tag: "bullseye" 35 | - image: "fedora" 36 | tag: "40" 37 | - image: "fedora" 38 | tag: "latest" 39 | - image: "ubuntu" 40 | tag: "latest" 41 | - image: "ubuntu" 42 | tag: "jammy" 43 | - image: "ubuntu" 44 | tag: "focal" 45 | 46 | galaxy: 47 | image: python:3.13 48 | script: 49 | - apt-get update -qq 50 | - apt-get -y -qq install ansible-core 51 | - ansible-galaxy role import --api-key ${GALAXY_API_KEY} robertdebock ${CI_PROJECT_NAME} 52 | rules: 53 | - if: $CI_COMMIT_TAG != null 54 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v4.4.0 5 | hooks: 6 | - id: trailing-whitespace 7 | - id: end-of-file-fixer 8 | - id: check-added-large-files 9 | 10 | - repo: https://github.com/adrienverge/yamllint 11 | rev: v1.32.0 12 | hooks: 13 | - id: yamllint 14 | args: 15 | - -c=.yamllint 16 | 17 | - repo: https://github.com/robertdebock/pre-commit 18 | rev: v1.5.2 19 | hooks: 20 | - id: ansible_role_find_unused_variable 21 | - id: ansible_role_find_empty_files 22 | - id: ansible_role_find_empty_directories 23 | - id: ansible_role_find_undefined_handlers 24 | - id: ansible_role_find_unquoted_values 25 | - id: ansible_role_find_horizontal_when 26 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | braces: 6 | max-spaces-inside: 1 7 | level: error 8 | brackets: 9 | max-spaces-inside: 1 10 | level: error 11 | line-length: disable 12 | truthy: 13 | check-keys: false 14 | 15 | ignore: | 16 | .tox/ 17 | .cache/ 18 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behaviour that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behaviour by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at robert@meinit.nl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # [Please contribute](#please-contribute) 2 | 3 | You can really make a difference by: 4 | 5 | - [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) 6 | - [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. 7 | 8 | I'll try to help and take every contribution seriously. 9 | 10 | It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. 11 | 12 | ## [Step by step](#step-by-step) 13 | 14 | Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. 15 | 16 | ### [1. Make an issue.](#1-make-an-issue) 17 | 18 | When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-dsvpn/issues). 19 | 20 | Making the issue help me and others to find similar problems in the future. 21 | 22 | ### [2. Fork the project.](#2-fork-the-project) 23 | 24 | On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-dsvpn), click `fork`. This copies everything to your GitHub namespace. 25 | 26 | ### [3. Make the changes](#3-make-the-changes) 27 | 28 | In you own GitHub namespace, make the required changes. 29 | 30 | I typically do that by cloning the repository (in your namespace) locally: 31 | 32 | ```shell 33 | git clone git@github.com:YOURNAMESPACE/ansible-role-dsvpn.git 34 | ``` 35 | 36 | Now you can start to edit on your laptop. 37 | 38 | ### [4. Optionally: test your changes](#4-optionally-test-your-changes) 39 | 40 | Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): 41 | 42 | ```shell 43 | pip install molecule tox ansible-lint docker 44 | ``` 45 | 46 | And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: 47 | 48 | ```shell 49 | image=centos tag=7 molecule test 50 | ``` 51 | 52 | Once it start to work, you can test multiple version of Ansible: 53 | 54 | ```shell 55 | image=centos tag=7 tox 56 | ``` 57 | 58 | ### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) 59 | 60 | You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. 61 | 62 | If you don't do it, I'll do it later for you. 63 | 64 | ### [6. Make a pull request](#6-make-a-pull-request) 65 | 66 | [GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. 67 | 68 | In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. 69 | 70 | ### [7. Wait](#7-wait) 71 | 72 | Now I'll get a message that you've added some code. Thank you, really. 73 | 74 | CI starts to test your changes. You can follow the progress on Travis. 75 | 76 | Please consider [sponsoring me](https://github.com/sponsors/robertdebock). 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2025 Robert de Bock (robert@meinit.nl) 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Ansible role dsvpn](#dsvpn) 2 | 3 | Install and configure DSVPN on your system. 4 | 5 | |GitHub|GitLab|Downloads|Version| 6 | |------|------|---------|-------| 7 | |[![github](https://github.com/robertdebock/ansible-role-dsvpn/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-dsvpn/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-dsvpn/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-dsvpn)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/dsvpn)](https://galaxy.ansible.com/robertdebock/dsvpn)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-dsvpn.svg)](https://github.com/robertdebock/ansible-role-dsvpn/releases/)| 8 | 9 | ## [Example Playbook](#example-playbook) 10 | 11 | This example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-dsvpn/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release. 12 | 13 | ```yaml 14 | --- 15 | - name: Converge 16 | hosts: all 17 | become: true 18 | gather_facts: true 19 | 20 | roles: 21 | - role: robertdebock.dsvpn 22 | ``` 23 | 24 | The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-dsvpn/blob/master/molecule/default/prepare.yml): 25 | 26 | ```yaml 27 | --- 28 | - name: Prepare 29 | hosts: all 30 | become: true 31 | gather_facts: false 32 | 33 | roles: 34 | - role: robertdebock.bootstrap 35 | - role: robertdebock.ca_certificates 36 | - role: robertdebock.core_dependencies 37 | - role: robertdebock.buildtools 38 | ``` 39 | 40 | Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. 41 | 42 | ## [Role Variables](#role-variables) 43 | 44 | The default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-dsvpn/blob/master/defaults/main.yml): 45 | 46 | ```yaml 47 | --- 48 | # defaults file for dsvpn 49 | 50 | # The released version to download. See https://github.com/jedisct1/dsvpn/releases. 51 | dsvpn_version: "0.1.3" 52 | 53 | # Where to download dsvpn to. 54 | dsvpn_temporary_directory: /tmp 55 | 56 | # Where to install dsvpn. 57 | dsvpn_install_directory: /usr/local/bin 58 | 59 | # Where to generate the keys. This is a sensitive file. 60 | dsvpn_key_directory: /tmp 61 | 62 | # The role to let dsvpn take, can be `client` or `server`. 63 | dsvpn_role: client 64 | 65 | # When the role `client` is selected, this is the address of the server 66 | # to connect to. Can be an address or a (resolvable) name. 67 | dsvpn_server: "127.0.0.1" 68 | ``` 69 | 70 | ## [Requirements](#requirements) 71 | 72 | - pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-dsvpn/blob/master/requirements.txt). 73 | 74 | ## [State of used roles](#state-of-used-roles) 75 | 76 | The following roles are used to prepare a system. You can prepare your system in another way. 77 | 78 | | Requirement | GitHub | GitLab | 79 | |-------------|--------|--------| 80 | |[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)| 81 | |[robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-buildtools)| 82 | |[robertdebock.ca_certificates](https://galaxy.ansible.com/robertdebock/ca_certificates)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-ca_certificates/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ca_certificates/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-ca_certificates/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-ca_certificates)| 83 | |[robertdebock.core_dependencies](https://galaxy.ansible.com/robertdebock/core_dependencies)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-core_dependencies/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-core_dependencies/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-core_dependencies)| 84 | |[robertdebock.service](https://galaxy.ansible.com/robertdebock/service)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-service/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-service/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-service/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-service)| 85 | 86 | ## [Context](#context) 87 | 88 | This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. 89 | 90 | Here is an overview of related roles: 91 | ![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-dsvpn/png/requirements.png "Dependencies") 92 | 93 | ## [Compatibility](#compatibility) 94 | 95 | This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): 96 | 97 | |container|tags| 98 | |---------|----| 99 | |[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9| 100 | |[Debian](https://hub.docker.com/r/robertdebock/debian)|all| 101 | |[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all| 102 | |[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all| 103 | 104 | The minimum version of Ansible required is 2.12, tests have been done to: 105 | 106 | - The previous version. 107 | - The current version. 108 | - The development version. 109 | 110 | If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-dsvpn/issues). 111 | 112 | ## [License](#license) 113 | 114 | [Apache-2.0](https://github.com/robertdebock/ansible-role-dsvpn/blob/master/LICENSE). 115 | 116 | ## [Author Information](#author-information) 117 | 118 | [robertdebock](https://robertdebock.nl/) 119 | 120 | Please consider [sponsoring me](https://github.com/sponsors/robertdebock). 121 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # [Security Policy](#security-policy) 2 | 3 | This software implements other software, it's not very likely that this software introduces new vulnerabilities. 4 | 5 | ## [Supported Versions](#supported-versions) 6 | 7 | These version of [ansible](https://pypi.org/project/ansible/) are supported: 8 | 9 | | Version | Supported | 10 | | ------- | ------------------ | 11 | | 7 | :white_check_mark: | 12 | | 6 | :white_check_mark: | 13 | | 5 | :white_check_mark: | 14 | 15 | ## [Reporting a Vulnerability](#reporting-a-vulnarability) 16 | 17 | Please [open an issue](https://github.com/robertdebock/ansible-role-dsvpn/issues) describing the vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | 23 | Please consider [sponsoring me](https://github.com/sponsors/robertdebock). 24 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for dsvpn 3 | 4 | # The released version to download. See https://github.com/jedisct1/dsvpn/releases. 5 | dsvpn_version: "0.1.3" 6 | 7 | # Where to download dsvpn to. 8 | dsvpn_temporary_directory: /tmp 9 | 10 | # Where to install dsvpn. 11 | dsvpn_install_directory: /usr/local/bin 12 | 13 | # Where to generate the keys. This is a sensitive file. 14 | dsvpn_key_directory: /tmp 15 | 16 | # The role to let dsvpn take, can be `client` or `server`. 17 | dsvpn_role: client 18 | 19 | # When the role `client` is selected, this is the address of the server 20 | # to connect to. Can be an address or a (resolvable) name. 21 | dsvpn_server: "127.0.0.1" 22 | -------------------------------------------------------------------------------- /handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for dsvpn 3 | 4 | - name: Restart dsvpn-server 5 | ansible.builtin.service: 6 | name: "dsvpn-server" 7 | state: restarted 8 | when: 9 | - dsvpn_role == "server" 10 | 11 | - name: Restart dsvpn-client 12 | ansible.builtin.service: 13 | name: "dsvpn-client" 14 | state: restarted 15 | when: 16 | - dsvpn_role == "client" 17 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: robertdebock 4 | role_name: dsvpn 5 | description: Install and configure DSVPN on your system. 6 | license: Apache-2.0 7 | company: none 8 | min_ansible_version: "2.12" 9 | 10 | platforms: 11 | - name: EL 12 | versions: 13 | - "9" 14 | - name: Debian 15 | versions: 16 | - all 17 | - name: Fedora 18 | versions: 19 | - all 20 | - name: Ubuntu 21 | versions: 22 | - all 23 | 24 | galaxy_tags: 25 | - dsvpn 26 | - networking 27 | 28 | dependencies: [] 29 | -------------------------------------------------------------------------------- /meta/preferences.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | matrix_overrides: 4 | amazonlinux: 5 | python: 6 | - python:3.9 7 | - python:3.10 8 | -------------------------------------------------------------------------------- /molecule/default/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | become: true 5 | gather_facts: true 6 | 7 | roles: 8 | - role: robertdebock.dsvpn 9 | -------------------------------------------------------------------------------- /molecule/default/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # Ansible managed 4 | # 5 | dependency: 6 | name: galaxy 7 | options: 8 | role-file: requirements.yml 9 | requirements-file: requirements.yml 10 | lint: | 11 | set -e 12 | yamllint . 13 | ansible-lint 14 | driver: 15 | name: docker 16 | platforms: 17 | - name: "dsvpn-${image:-fedora}-${tag:-latest}${TOX_ENVNAME}" 18 | image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" 19 | command: /sbin/init 20 | cgroupns_mode: host 21 | volumes: 22 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 23 | privileged: true 24 | pre_build_image: true 25 | provisioner: 26 | name: ansible 27 | verifier: 28 | name: ansible 29 | -------------------------------------------------------------------------------- /molecule/default/prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Prepare 3 | hosts: all 4 | become: true 5 | gather_facts: false 6 | 7 | roles: 8 | - role: robertdebock.bootstrap 9 | - role: robertdebock.ca_certificates 10 | - role: robertdebock.core_dependencies 11 | - role: robertdebock.buildtools 12 | -------------------------------------------------------------------------------- /molecule/default/verify.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Verify 3 | hosts: all 4 | become: true 5 | gather_facts: false 6 | 7 | tasks: 8 | - name: Check if connection still works 9 | ansible.builtin.ping: 10 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | molecule 2 | molecule-plugins[docker] 3 | paramiko 4 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | roles: 3 | - name: robertdebock.bootstrap 4 | - name: robertdebock.buildtools 5 | - name: robertdebock.ca_certificates 6 | - name: robertdebock.core_dependencies 7 | - name: robertdebock.service 8 | collections: 9 | - name: community.general 10 | -------------------------------------------------------------------------------- /tasks/assert.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: assert | Test dsvpn_version 4 | ansible.builtin.assert: 5 | that: 6 | - dsvpn_version is defined 7 | - dsvpn_version is string 8 | - dsvpn_version is not none 9 | quiet: true 10 | 11 | - name: assert | Test dsvpn_temporary_directory 12 | ansible.builtin.assert: 13 | that: 14 | - dsvpn_temporary_directory is defined 15 | - dsvpn_temporary_directory is string 16 | - dsvpn_temporary_directory is not none 17 | quiet: true 18 | 19 | - name: assert | Test dsvpn_install_directory 20 | ansible.builtin.assert: 21 | that: 22 | - dsvpn_install_directory is defined 23 | - dsvpn_install_directory is string 24 | - dsvpn_install_directory is not none 25 | quiet: true 26 | 27 | - name: assert | Test dsvpn_key_directory 28 | ansible.builtin.assert: 29 | that: 30 | - dsvpn_key_directory is defined 31 | - dsvpn_key_directory is string 32 | - dsvpn_key_directory is not none 33 | quiet: true 34 | 35 | - name: assert | Test dsvpn_role 36 | ansible.builtin.assert: 37 | that: 38 | - dsvpn_role is defined 39 | - dsvpn_role is string 40 | - dsvpn_role in [ "client", "server" ] 41 | quiet: true 42 | 43 | - name: assert | Test dsvpn_server 44 | ansible.builtin.assert: 45 | that: 46 | - dsvpn_server is defined 47 | - dsvpn_server is string 48 | - dsvpn_server is not none 49 | quiet: true 50 | when: 51 | - dsvpn_role == "client" 52 | -------------------------------------------------------------------------------- /tasks/client.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: client | Create client service 4 | ansible.builtin.import_role: 5 | name: robertdebock.service 6 | vars: 7 | service_list: 8 | - name: dsvpn-client 9 | description: Dead simple VPN client 10 | start_command: "{{ dsvpn_install_directory }}/dsvpn client {{ dsvpn_key_directory }}/vpn.key {{ dsvpn_server }}" 11 | notify: 12 | - Restart dsvpn-client 13 | 14 | - name: client | Start dsvpn-client 15 | ansible.builtin.service: 16 | name: dsvpn-client 17 | state: started 18 | enabled: true 19 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for dsvpn 3 | 4 | - name: Import assert.yml 5 | ansible.builtin.import_tasks: 6 | file: assert.yml 7 | run_once: true 8 | delegate_to: localhost 9 | 10 | - name: Install requirements 11 | ansible.builtin.package: 12 | name: "{{ dsvpn_requirements }}" 13 | state: present 14 | 15 | - name: Unarchive 16 | ansible.builtin.unarchive: 17 | src: "{{ dsvpn_release_url }}" 18 | dest: "{{ dsvpn_temporary_directory }}" 19 | remote_src: true 20 | creates: "{{ dsvpn_temporary_directory }}/dsvpn-{{ dsvpn_version }}" 21 | mode: "0755" 22 | 23 | - name: Make 24 | community.general.make: 25 | chdir: "{{ dsvpn_temporary_directory }}/dsvpn-{{ dsvpn_version }}" 26 | 27 | - name: Install 28 | ansible.builtin.copy: 29 | src: "{{ dsvpn_temporary_directory }}/dsvpn-{{ dsvpn_version }}/dsvpn" 30 | dest: "{{ dsvpn_install_directory }}/dsvpn" 31 | remote_src: true 32 | mode: "750" 33 | 34 | - name: Generate key 35 | ansible.builtin.command: 36 | cmd: dd if=/dev/urandom of={{ dsvpn_key_directory }}/vpn.key count=1 bs=32 37 | creates: "{{ dsvpn_key_directory }}/vpn.key" 38 | delegate_to: localhost 39 | 40 | - name: Set permissions on key 41 | ansible.builtin.file: 42 | path: "{{ dsvpn_key_directory }}/vpn.key" 43 | mode: "644" 44 | delegate_to: localhost 45 | 46 | - name: Copy key 47 | ansible.builtin.copy: 48 | src: "{{ dsvpn_key_directory }}/vpn.key" 49 | dest: "{{ dsvpn_key_directory }}/vpn.key" 50 | mode: "640" 51 | owner: root 52 | group: root 53 | notify: 54 | - Restart dsvpn-server 55 | - Restart dsvpn-client 56 | 57 | - name: Load tun module 58 | community.general.modprobe: 59 | name: tun 60 | state: present 61 | when: 62 | - ansible_connection not in [ "container", "docker", "community.docker.docker" ] 63 | 64 | - name: Create /dev/net directory 65 | ansible.builtin.file: 66 | path: /dev/net 67 | state: directory 68 | mode: "0755" 69 | 70 | - name: Create character device /dev/net/tun 71 | ansible.builtin.command: 72 | cmd: mknod /dev/net/tun c 10 200 73 | creates: /dev/net/tun 74 | 75 | - name: Create server 76 | ansible.builtin.include_tasks: 77 | file: server.yml 78 | when: 79 | - dsvpn_role == "server" 80 | 81 | - name: Create client 82 | ansible.builtin.include_tasks: 83 | file: client.yml 84 | when: 85 | - dsvpn_role == "client" 86 | -------------------------------------------------------------------------------- /tasks/server.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: server | Create server service 4 | ansible.builtin.import_role: 5 | name: robertdebock.service 6 | vars: 7 | service_list: 8 | - name: dsvpn-server 9 | description: Dead simple VPN server 10 | start_command: "{{ dsvpn_install_directory }}/dsvpn server {{ dsvpn_key_directory }}/vpn.key" 11 | notify: 12 | - Restart dsvpn-server 13 | 14 | - name: server | Start dsvpn-server 15 | ansible.builtin.service: 16 | name: dsvpn-server 17 | state: started 18 | enabled: true 19 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = ansible-2.{15,16,17,18} 3 | skipsdist = true 4 | 5 | [testenv] 6 | commands = molecule test 7 | 8 | setenv = 9 | TOX_ENVNAME={envname} 10 | PY_COLORS=1 11 | ANSIBLE_FORCE_COLOR=1 12 | ANSIBLE_ROLES_PATH=../ 13 | 14 | passenv = * 15 | 16 | # Test supported releases of ansible-core. See: 17 | # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix 18 | 19 | [testenv:ansible-2.15] 20 | basepython = python3.9 21 | deps = 22 | -rrequirements.txt 23 | ansible-core==2.15.* 24 | ansible-lint==6.* 25 | 26 | [testenv:ansible-2.16] 27 | basepython = python3.10 28 | deps = 29 | -rrequirements.txt 30 | ansible-core==2.16.* 31 | ansible-lint==24.* 32 | 33 | [testenv:ansible-2.17] 34 | basepython = python3.10 35 | deps = 36 | -rrequirements.txt 37 | ansible-core==2.17.* 38 | ansible-lint==24.* 39 | 40 | [testenv:ansible-2.18] 41 | basepython = python3.13 42 | deps = 43 | -rrequirements.txt 44 | ansible-core==2.18.* 45 | ansible-lint==24.* 46 | -------------------------------------------------------------------------------- /vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for dsvpn 3 | 4 | _dsvpn_requirements: 5 | default: 6 | - kmod 7 | Debian: 8 | - kmod 9 | - iproute2 10 | RedHat: 11 | - kmod 12 | - iproute 13 | 14 | dsvpn_requirements: "{{ _dsvpn_requirements[ansible_os_family] | default(_dsvpn_requirements['default']) }}" 15 | 16 | dsvpn_release_url: "https://github.com/jedisct1/dsvpn/archive/{{ dsvpn_version }}.tar.gz" 17 | --------------------------------------------------------------------------------