mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-24 04:54:00 -07:00
This commit is contained in:
parent
ae3287d84d
commit
b762eb2d92
3 changed files with 45 additions and 17 deletions
|
|
@ -373,3 +373,17 @@
|
|||
register: result
|
||||
failed_when: result is not failed
|
||||
when: has_httptester
|
||||
|
||||
- name: Write out netrc template
|
||||
template:
|
||||
src: netrc.j2
|
||||
dest: "{{ output_dir }}/netrc"
|
||||
|
||||
- debug:
|
||||
msg: "{{ lookup('file', output_dir ~ '/netrc') }}"
|
||||
|
||||
- name: Test netrc with port
|
||||
uri:
|
||||
url: "https://{{ httpbin_host }}:443/basic-auth/user/passwd"
|
||||
environment:
|
||||
NETRC: "{{ output_dir|expanduser }}/netrc"
|
||||
|
|
|
|||
3
test/integration/targets/uri/templates/netrc.j2
Normal file
3
test/integration/targets/uri/templates/netrc.j2
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
machine {{ httpbin_host }}
|
||||
login user
|
||||
password passwd
|
||||
Loading…
Add table
Add a link
Reference in a new issue