ansible-openwisp2
ansible-openwisp2 copied to clipboard
Vpn management creation
Checklist
- [X] I have read the OpenWISP Contributing Guidelines.
- [X] I have manually tested the changes proposed in this pull request.
- [ ] I have written new test cases for new code and/or updated existing tests for changes to existing code.
- [ ] I have updated the documentation.
Reference to Existing Issue
First Draft for implementing the server part of #201. Only tested in molecule for now.
Description of Changes
- If
openwisp2_openvpn_setupis set to true - If there is no VPN objects in openwisp A VPN server object is created by the load_initial_data.py script. Its name and id are known by ansible only for this run, which makes it possible to download the configuration and start the openvpn server.
That is if there is no error...
If an error occurs somewhere after adding the VPN object in the DB, the name and id of the VPN will not be available on the following runs, which means the setup must be completed manually... Not sure if this is acceptable and/or if there is a better way to address that problem (known unique vpn_server_name that we can look for on every run instead ?)
In any case, let me know what you think about this...