Skip to content

Commit

Permalink
testing fix for #2591
Browse files Browse the repository at this point in the history
will repush with actually informative commit message when this is working
  • Loading branch information
redshiftzero committed Nov 27, 2017
1 parent a2df1a3 commit 97cc951
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,25 @@
set_fact:
_smtp_hostname_query_command: >-
{% if ansible_lsb.id == "Tails" -%}torify {% endif %}
nslookup -vc -retry=3 -timeout=10 -fail {{ smtp_relay }} 8.8.8.8
host {{ smtp_relay }} 8.8.8.8
_sasl_hostname_query_command: >-
{% if ansible_lsb.id == "Tails" %}torify {% endif %}
nslookup -vc -retry=3 -timeout=10 -fail {{ sasl_domain }} 8.8.8.8
host {{ sasl_domain }} 8.8.8.8
- name: Perform SMTP lookup check.
command: "{{ _smtp_hostname_query_command }}"
changed_when: false
register: smtp_validate_result
# We'll inspect return code in subsequent task to provide an informative
# failure message.
# We'll inspect the output of this command in the next task to see if
# an address was found.
ignore_errors: yes
retries: 3
timeout: 10

- name: Validate SMTP relay connection.
assert:
that:
- "{{ smtp_validate_result.rc == 0 }}"
- "'has address' not in smtp_validate_result.stdout"
msg: >-
The SMTP relay domain failed during lookup. This domain
is the server contacted for authentication in order to send
Expand All @@ -77,14 +79,16 @@
command: "{{ _sasl_hostname_query_command }}"
register: sasl_validate_result
changed_when: false
# We'll inspect return code in subsequent task to provide an informative
# failure message.
# We'll inspect the output of this command in the next task to see if
# an address was found.
ignore_errors: yes
retries: 3
timeout: 10

- name: Validate SASL domain.
assert:
that:
- "{{ sasl_validate_result.rc == 0 }}"
- "'has address' not in sasl_validate_result.stdout"
msg: >-
The SASL domain failed during lookup. This is typically the
portion of the email address after the '@' symbol, although
Expand Down

0 comments on commit 97cc951

Please sign in to comment.