Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

remove charonstart option as deprecated #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ The `ipsec.conf` file is configured through the following vars (and their defaul
```
strongswan_config_setup:
uniqueids: yes
charonstart: yes
charondebug: ''

strongswan_conn_default: {}
Expand Down
5 changes: 2 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---

strongswan_config_file: "{{strongswan_prefix}}/ipsec.conf"
strongswan_config_file: "{{ strongswan_prefix }}/ipsec.conf"

strongswan_secrets_file: "{{strongswan_prefix}}/ipsec.secrets"
strongswan_secrets_file: "{{ strongswan_prefix }}/ipsec.secrets"

strongswan_config_setup:
uniqueids: 'yes'
charonstart: 'yes'
charondebug: ''

# strongswan_conn_default: Defaults for connections
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

- name: ipsec reload
command: >
{{strongswan_ipsec_bin}} reload
{{ strongswan_ipsec_bin }} reload
when: not (_strongswan_pkgs|changed)

- name: ipsec secrets reload
command: >
{{strongswan_ipsec_bin}} rereadsecrets
{{ strongswan_ipsec_bin }} rereadsecrets
when: not (_strongswan_pkgs|changed)


Expand Down
4 changes: 2 additions & 2 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Strongswan ipsec.conf
template:
src: etc/ipsec.conf.j2
dest: "{{strongswan_config_file}}"
dest: "{{ strongswan_config_file }}"
owner: "root"
group: "root"
mode: "0644"
Expand All @@ -12,7 +12,7 @@
- name: Strongswan ipsec.secrets
template:
src: etc/ipsec.secrets.j2
dest: "{{strongswan_secrets_file}}"
dest: "{{ strongswan_secrets_file }}"
owner: "root"
group: "root"
mode: "0640"
Expand Down
6 changes: 3 additions & 3 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---

- include: "install/{{ansible_os_family}}.yml"
- include: "install/{{ ansible_os_family }}.yml"

- name: Strongswan packages
package:
name: "{{item}}"
name: "{{ item }}"
state: present
with_items: "{{strongswan_packages}}"
with_items: "{{ strongswan_packages }}"
register: _strongswan_pkgs

# vi:ts=2:sw=2:et:ft=yaml
2 changes: 1 addition & 1 deletion tasks/install/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: EPEL Repository (RedHat)
yum:
name: "{{strongswan_epel_url}}"
name: "{{ strongswan_epel_url }}"
state: present

# vi:ts=2:sw=2:et:ft=yaml
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Include OS Family vars
include_vars: "{{ansible_os_family}}.yml"
include_vars: "{{ ansible_os_family }}.yml"
tags: always

- include: install.yml
Expand Down
6 changes: 3 additions & 3 deletions tests/test_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
uniqueids: yes
charondebug: 'ike 2, knl 3, cfg 0'
- strongswan_conn_default:
left: "{{ansible_default_ipv4.address}}"
leftsourceip: "{{ansible_default_ipv4.address}}"
left: "{{ ansible_default_ipv4.address }}"
leftsourceip: "{{ ansible_default_ipv4.address }}"
leftsubnet: 10.0.0.0/16
type: tunnel
keyexchange: ikev2
Expand All @@ -22,7 +22,7 @@
esp: aes256-sha1-modp1024
auto: route
- strongswan_secrets:
- left: "{{ansible_default_ipv4.address}}"
- left: "{{ ansible_default_ipv4.address }}"
right: 1.2.3.4
type: PSK
credentials: '"super wooper dooper secret"'
Expand Down
6 changes: 3 additions & 3 deletions tests/test_vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
uniqueids: yes
charondebug: 'ike 2, knl 3, cfg 0'
- strongswan_conn_default:
left: "{{ansible_default_ipv4.address}}"
leftsourceip: "{{ansible_default_ipv4.address}}"
left: "{{ ansible_default_ipv4.address }}"
leftsourceip: "{{ ansible_default_ipv4.address }}"
leftsubnet: 10.0.0.0/16
type: tunnel
keyexchange: ikev2
Expand All @@ -22,7 +22,7 @@
esp: aes256-sha1-modp1024
auto: route
- strongswan_secrets:
- left: "{{ansible_default_ipv4.address}}"
- left: "{{ ansible_default_ipv4.address }}"
right: 1.2.3.4
type: PSK
credentials: '"super wooper dooper secret"'
Expand Down
10 changes: 5 additions & 5 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ strongswan_prefix: /etc/strongswan

strongswan_ipsec_bin: /sbin/strongswan

strongswan_os_major: "{{ansible_distribution_major_version}}"
# CentOS: "{{ansible_distribution_major_version}}"
# RedHat: "{{ansible_distribution_major_version}}"
strongswan_os_major: "{{ ansible_distribution_major_version }}"
# CentOS: "{{ ansible_distribution_major_version }}"
# RedHat: "{{ ansible_distribution_major_version }}"
# Amazon: 6

strongswan_epel_baseurl: "https://dl.fedoraproject.org"
strongswan_epel_package: "epel-release-latest-{{strongswan_os_major[ansible_distribution]}}.noarch.rpm"
strongswan_epel_url: "{{strongswan_epel_baseurl}}/pub/epel/{{strongswan_epel_package}}"
strongswan_epel_package: "epel-release-latest-{{ strongswan_os_major[ansible_distribution] }}.noarch.rpm"
strongswan_epel_url: "{{ strongswan_epel_baseurl }}/pub/epel/{{ strongswan_epel_package }}"

# vi:ts=2:sw=2:et:ft=yaml