diff --git a/README.md b/README.md index 0ffea0f..50a55d8 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,13 @@ at the cost of knowing clients in advance. roles: - role: stunnel-role - stunnel_use_cert: false + stunnel_use_certificate: false stunnel_use_psk: true - stunnel_psk: + stunnel_psks: - name: client1 - psk: ATJX7VOAMIF2nhaknNVmSqSQGrCvMyPt + key: ATJX7VOAMIF2nhaknNVmSqSQGrCvMyPt - name: client2 - psk: enNezGQMkZmSyjTDjpndjrBEXhJ9ki3v + key: enNezGQMkZmSyjTDjpndjrBEXhJ9ki3v stunnel_services: - service: name: postfix diff --git a/defaults/main.yml b/defaults/main.yml index 6317190..92e96af 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,8 +10,5 @@ stunnel_certificate_state_name: state stunnel_certificate_locality: locality stunnel_certificate_file: /tmp/certificate.pem stunnel_key_file: /tmp/key.pem -stunnel_services: - - service: - name: https - accept: 443 - connect: 80 +stunnel_services: [] +stunnel_psks: [] diff --git a/tasks/main.yml b/tasks/main.yml index 009f74a..53565ab 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,10 +19,10 @@ register: install_stunnel_4 - include: certificate.yml - when: stunnel_use_certificate + when: stunnel_use_certificate | bool - include: psk.yml - when: stunnel_use_psk + when: stunnel_use_psk | bool - name: Stunnel configuration template: diff --git a/templates/psk.txt.j2 b/templates/psk.txt.j2 index 4eb9ab0..1e4300c 100644 --- a/templates/psk.txt.j2 +++ b/templates/psk.txt.j2 @@ -1,5 +1,3 @@ {% for psk in stunnel_psks %} {{ psk.name }}:{{ psk.key }} {% endfor %} - -