-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
--- | ||
- name: reload-ocserv | ||
become: True | ||
service: | ||
name: ocserv.service | ||
enabled: True | ||
state: restarted | ||
|
||
- name: reload systemd | ||
become: True | ||
systemd: | ||
daemon_reload: True | ||
- name: Reload ocserv | ||
become: true | ||
ansible.builtin.service: | ||
name: ocserv.service | ||
enabled: true | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
--- | ||
galaxy_info: | ||
author: SOSETH | ||
namespace: soseth | ||
description: See README.md | ||
company: sos.ethz.ch | ||
issue_tracker_url: https://github.com/SOSETH/ocserv/issues | ||
license: GPLv3 | ||
min_ansible_version: 2.3.0 | ||
min_ansible_version: "2.3.0" | ||
platforms: | ||
- name: Debian | ||
versions: | ||
- buster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
--- | ||
- include_tasks: variables.yml | ||
- name: Include variables | ||
ansible.builtin.include_tasks: variables.yml | ||
|
||
- name: Install ocserv | ||
become: True | ||
package: | ||
become: true | ||
ansible.builtin.package: | ||
name: ocserv | ||
state: present | ||
|
||
- name: Configure ocserv | ||
become: True | ||
template: | ||
become: true | ||
ansible.builtin.template: | ||
src: ocserv.conf.j2 | ||
dest: /etc/ocserv/ocserv.conf | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: reload-ocserv | ||
mode: "0644" | ||
notify: Reload ocserv | ||
|
||
- name: Create script dir | ||
become: True | ||
file: | ||
become: true | ||
ansible.builtin.file: | ||
path: /etc/ocserv/scripts | ||
state: directory | ||
mode: "0755" | ||
|
||
- name: Copy scripts | ||
become: True | ||
template: | ||
become: true | ||
ansible.builtin.template: | ||
src: "{{ item }}.j2" | ||
dest: "/etc/ocserv/scripts/{{ item }}" | ||
owner: root | ||
group: root | ||
mode: 0750 | ||
mode: "0750" | ||
with_items: | ||
- connect.sh | ||
- disconnect.sh | ||
when: ocserv_use_connect_script or ocserv_use_disconnect_script | ||
notify: reload-ocserv | ||
notify: Reload ocserv | ||
|
||
- name: Deploy PAM config | ||
become: True | ||
copy: | ||
become: true | ||
ansible.builtin.copy: | ||
src: etc_pam_d_ocserv | ||
dest: /etc/pam.d/ocserv | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
mode: "0644" | ||
when: ocserv_pam_otp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
- name: Check oc_default_domain variable | ||
fail: | ||
ansible.builtin.fail: | ||
msg: "Bailing out: ocserv_default_domain is not set" | ||
when: ocserv_default_domain|length == 0 | ||
|
||
- name: Check ocserv_cl_network.ipv4 variable | ||
fail: | ||
ansible.builtin.fail: | ||
msg: "Bailing out: ocserv_cl_network.ipv4 is not set" | ||
when: ocserv_cl_network.ipv4|length == 0 | ||
|
||
- name: Check ocserv_routes variable | ||
fail: | ||
ansible.builtin.fail: | ||
msg: "Bailing out: ocserv_routes is not set" | ||
when: ocserv_routes|length == 0 |