Merge branch 'devel' into devel_switch_v2

This commit is contained in:
James Cammarata 2015-06-01 16:53:15 -05:00
commit e547e1f9ba
8 changed files with 125 additions and 6 deletions

View file

@ -0,0 +1,3 @@
---
allow_duplicates: yes

View file

@ -26,7 +26,7 @@
- result.changed
- '"OK" in result.msg'
- name: test https fetch to a site with invalid domain
- name: test https fetch to a site with mismatched hostname and certificate
get_url:
url: "https://kennethreitz.org/"
dest: "{{ output_dir }}/shouldnotexist.html"
@ -37,11 +37,26 @@
path: "{{ output_dir }}/shouldnotexist.html"
register: stat_result
- debug: var=result
- name: Assert that the file was not downloaded
assert:
that:
- "result.failed == true"
- "'Certificate does not belong to ' in result.msg"
- "stat_result.stat.exists == false"
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
get_url:
url: "https://kennethreitz.org/"
dest: "{{ output_dir }}/kreitz.html"
validate_certs: no
register: result
- stat:
path: "{{ output_dir }}/kreitz.html"
register: stat_result
- name: Assert that the file was downloaded
assert:
that:
- "result.changed == true"
- "stat_result.stat.exists == true"

View file

@ -91,3 +91,38 @@
with_together:
- fail_checksum.results
- fail.results
- name: test https fetch to a site with mismatched hostname and certificate
uri:
url: "https://kennethreitz.org/"
dest: "{{ output_dir }}/shouldnotexist.html"
ignore_errors: True
register: result
- stat:
path: "{{ output_dir }}/shouldnotexist.html"
register: stat_result
- name: Assert that the file was not downloaded
assert:
that:
- "result.failed == true"
- "'certificate does not match ' in result.msg"
- "stat_result.stat.exists == false"
- name: test https fetch to a site with mismatched hostname and certificate and validate_certs=no
get_url:
url: "https://kennethreitz.org/"
dest: "{{ output_dir }}/kreitz.html"
validate_certs: no
register: result
- stat:
path: "{{ output_dir }}/kreitz.html"
register: stat_result
- name: Assert that the file was downloaded
assert:
that:
- "result.changed == true"
- "stat_result.stat.exists == true"

View file

@ -18,6 +18,7 @@
- hosts: windows
gather_facts: false
max_fail_percentage: 1
roles:
- { role: test_win_raw, tags: test_win_raw }
- { role: test_win_script, tags: test_win_script }