netzwirt.openvpn
ansible-openvpn
使用 PKI 的 OpenVPN 适用于 Ubuntu/Debian
要求
无
角色变量
证书主题:
openvpn_domainComponent_tld: "com"
openvpn_domainComponent_domain: "example"
openvpn_organizationName: "ACME Inc"
创建一个包含所有希望访问 VPN 服务器的用户的列表:
openvpn_users:
- { username: 'fred', fullname: '弗雷德·弗林斯通', email: '[email protected]' }
- { username: 'john', fullname: '约翰·示例', email: '[email protected]' }
撤销证书:
不要从 openvpn_users
中删除用户。要撤销证书,请创建一个包含用户名的列表:
openvpn_revocation_list:
- fred
服务器池配置
简单方法:将使用 openvpn 的 --server 参数
openvpn_server_full_pool: "10.8.0.0 255.255.255.0"
高级方法:控制 ifconfig-pool。将 openvpn_server_full_pool
设置为空字符串,并配置路由、ifconfig-pool 和 ifconfig
openvpn_server_full_pool: ''
openvpn_ifconfig: "10.8.8.1 255.255.252.0"
openvpn_push_route_gateway: "10.8.8.1"
openvpn_ifconfig_pool: "10.8.8.2 10.8.8.199 255.255.255.0"
从命令行续订证书
将额外变量 simplepki_renew_certificates
传递给 ansible-playbook
。这个变量只能作为命令行参数传递。
ansible-playbook --extra-vars '{"simplepki_renew_certificates": ["fred","john"]}'
从命令行撤销证书
将额外变量 simplepki_revocation_list
传递给 ansible-playbook
。
ansible-playbook --extra-vars '{"simplepki_revocation_list": ["fred","john"]}'
依赖项
- 在剧本中使用 netzwirt.simple-pki
示例剧本
---
- hosts: openvpn
become: true
roles:
- netzwirt.simple-pki
- netzwirt.openvpn
许可证
BSD
作者信息
安装
ansible-galaxy install netzwirt.openvpn
许可证
Unknown
下载
118
拥有者