Permalink
Browse files

Fix error on `has_key`

  • Loading branch information...
znz committed Nov 16, 2018
1 parent f00124d commit 87d4031250fcb9cf13ec8cbdb7ec97799fcc84e6
Showing with 3 additions and 3 deletions.
  1. +1 −1 tasks/main.yml
  2. +2 −2 templates/client.conf.j2
@@ -23,7 +23,7 @@
mode: 0600
notify: Enable OpenVPN client
with_items: "{{ openvpn_client }}"
when: item.has_key('ta_key') and item.ta_key != ""
when: '"ta_key" in item and item.ta_key != ""'
- name: "Copy client crt"
copy:
@@ -14,12 +14,12 @@ cert {{ item.name }}.crt
key {{ item.name }}.key
;ns-cert-type server
remote-cert-tls server
{% if item.has_key('ta_key') and item.ta_key != "" %}
{% if "ta_key" in item and item.ta_key != "" %}
tls-auth {{ item.name }}-ta.key 1
{% endif %}
cipher {{ item.cipher }}
auth {{ item.auth }}
{% if item.has_key('tls_cipher') and item.tls_cipher != "" %}
{% if "tls_cipher" in item and item.tls_cipher != "" %}
tls-cipher {{ item.tls_cipher }}
{% endif %}
comp-lzo

0 comments on commit 87d4031

Please sign in to comment.