feat: add openfortivpn role
This commit is contained in:
parent
2a7efd6472
commit
4801f7bd38
3 changed files with 53 additions and 0 deletions
26
ansible/roles/openfortivpn/tasks/main.yaml
Normal file
26
ansible/roles/openfortivpn/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# - name: Generate openfortivpn systemd service unit
|
||||
# become: true
|
||||
# template:
|
||||
# src: systemd/system/openfortivpn.service
|
||||
# dest: /usr/lib/systemd/system/openfortivpn@.service
|
||||
|
||||
- name: Create config dir
|
||||
become: true
|
||||
file:
|
||||
path: /etc/openfortivpn
|
||||
state: directory
|
||||
|
||||
- name: Generate openfortivpn profile config
|
||||
become: true
|
||||
template:
|
||||
src: openfortivpn/basic_vpn.conf
|
||||
dest: "/etc/openfortivpn/{{ item.name }}.conf"
|
||||
with_items: "{{ openfortivpn_profiles }}"
|
||||
|
||||
- name: Enable openfortivpn systemd service for a given profile
|
||||
become: true
|
||||
ansible.builtin.systemd_service:
|
||||
name: "openfortivpn@{{ item.name }}"
|
||||
state: stopped
|
||||
enabled: true
|
||||
loop: "{{ openfortivpn_profiles }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue