Skip to content

Commit

Permalink
Fix documentation and avoid evaluating bare variables
Browse files Browse the repository at this point in the history
  • Loading branch information
migibert committed Aug 27, 2019
1 parent ea02988 commit 973245b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions templates/psk.txt.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% for psk in stunnel_psks %}
{{ psk.name }}:{{ psk.key }}
{% endfor %}


0 comments on commit 973245b

Please sign in to comment.