Skip to content

Commit

Permalink
Initial support for Ubuntu 20.04 (trailofbits#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemyers authored Apr 25, 2020
1 parent e29615b commit eeda23b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions roles/strongswan/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ipsec_config_path: "configs/{{ IP_subject_alt_name }}/ipsec/"
ipsec_pki_path: "{{ ipsec_config_path }}/.pki/"
strongswan_shell: /usr/sbin/nologin
strongswan_home: /var/lib/strongswan
strongswan_service: "{{ 'strongswan-starter' if ansible_distribution_major_version|int > 19 else 'strongswan' }}"
BetweenClients_DROP: true
algo_ondemand_cellular: false
algo_ondemand_wifi: false
Expand Down
2 changes: 1 addition & 1 deletion roles/strongswan/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: restart strongswan
service: name=strongswan state=restarted
service: name={{ strongswan_service }} state=restarted

- name: daemon-reload
systemd: daemon_reload=true
Expand Down
2 changes: 1 addition & 1 deletion roles/strongswan/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- name: strongSwan started
service:
name: strongswan
name: "{{ strongswan_service }}"
state: started
enabled: true

Expand Down
6 changes: 3 additions & 3 deletions roles/strongswan/tasks/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
service: name={{ item }} enabled=yes
with_items:
- apparmor
- strongswan
- "{{ strongswan_service }}"
- netfilter-persistent

- name: Ubuntu | Ensure that the strongswan service directory exists
file:
path: /etc/systemd/system/strongswan.service.d/
path: /etc/systemd/system/{{ strongswan_service }}.service.d/
state: directory
mode: 0755
owner: root
Expand All @@ -49,7 +49,7 @@
- name: Ubuntu | Setup the cgroup limitations for the ipsec daemon
template:
src: 100-CustomLimitations.conf.j2
dest: /etc/systemd/system/strongswan.service.d/100-CustomLimitations.conf
dest: /etc/systemd/system/{{ strongswan_service }}.service.d/100-CustomLimitations.conf
notify:
- daemon-reload
- restart strongswan

0 comments on commit eeda23b

Please sign in to comment.