mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-21 19:43:59 -07:00
[PR #9795/96b49300 backport][stable-10] add the wsl connection plugin (#10019)
add the wsl connection plugin (#9795)
* add the wsl connection plugin
* move the banner_timeout required paramiko version to its own line
* document the proxy_command required paramiko version
* document the timeout required paramiko version
* simplify the sending of the become_pass value
* add Connection.__init__ type hints
* add MyAddPolicy.missing_host_key type hints
* normalize the Connection._parse_proxy_command replacers dict values to the str type
* add the user_known_hosts_file option
* modify the private_key_file option type to path
(cherry picked from commit 96b493002c
)
Co-authored-by: Rui Lopes <rgl@ruilopes.com>
This commit is contained in:
parent
91ac9f84b8
commit
ee2779e6c1
12 changed files with 1551 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- hosts: "{{ target_hosts }}"
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: create file without content
|
||||
copy:
|
||||
content: ""
|
||||
dest: "{{ remote_tmp }}/test_empty.txt"
|
||||
force: no
|
||||
mode: '0644'
|
||||
|
||||
- name: assert file without content exists
|
||||
stat:
|
||||
path: "{{ remote_tmp }}/test_empty.txt"
|
||||
register: empty_file_stat
|
||||
|
||||
- name: verify file without content exists
|
||||
assert:
|
||||
that:
|
||||
- empty_file_stat.stat.exists
|
||||
fail_msg: "The file {{ remote_tmp }}/test_empty.txt does not exist."
|
||||
|
||||
- name: verify file without content is empty
|
||||
assert:
|
||||
that:
|
||||
- empty_file_stat.stat.size == 0
|
||||
fail_msg: "The file {{ remote_tmp }}/test_empty.txt is not empty."
|
Loading…
Add table
Add a link
Reference in a new issue