Debian Codegraph @

test/integration/targets/get_url/tasks/use_gssapi.yml

raw
1 - name: test Negotiate auth over HTTP with explicit credentials
2 get_url:
3 url: http://{{ httpbin_host }}/gssapi
4 dest: '{{ remote_tmp_dir }}/gssapi_explicit.txt'
5 use_gssapi: yes
6 url_username: '{{ krb5_username }}'
7 url_password: '{{ krb5_password }}'
8 register: http_explicit
9
10 - name: get result of test Negotiate auth over HTTP with explicit credentials
11 slurp:
12 path: '{{ remote_tmp_dir }}/gssapi_explicit.txt'
13 register: http_explicit_actual
14
15 - name: assert test Negotiate auth with implicit credentials
16 assert:
17 that:
18 - http_explicit.status_code == 200
19 - http_explicit_actual.content | b64decode | trim == 'Microsoft Rulz'
20
21 - name: skip tests on macOS, I cannot seem to get it to read a credential from a custom ccache
22 when: ansible_facts.distribution != 'MacOSX'
23 block:
24 - name: get Kerberos ticket for implicit auth tests
25 httptester_kinit:
26 username: '{{ krb5_username }}'
27 password: '{{ krb5_password }}'
28
29 - name: test Negotiate auth over HTTPS with implicit credentials
30 get_url:
31 url: https://{{ httpbin_host }}/gssapi
32 dest: '{{ remote_tmp_dir }}/gssapi_implicit.txt'
33 use_gssapi: yes
34 register: https_implicit
35
36 - name: get result of test Negotiate auth over HTTPS with implicit credentials
37 slurp:
38 path: '{{ remote_tmp_dir }}/gssapi_implicit.txt'
39 register: https_implicit_actual
40
41 - name: assert test Negotiate auth with implicit credentials
42 assert:
43 that:
44 - https_implicit.status_code == 200
45 - https_implicit_actual.content | b64decode | trim == 'Microsoft Rulz'