Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/connection_wsl/plugin-specific-tests.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - hosts: "{{ target_hosts }}"
7 gather_facts: false
8 tasks:
9 - name: create file without content
10 copy:
11 content: ""
12 dest: "{{ remote_tmp }}/test_empty.txt"
13 force: false
14 mode: '0644'
15
16 - name: assert file without content exists
17 stat:
18 path: "{{ remote_tmp }}/test_empty.txt"
19 register: empty_file_stat
20
21 - name: verify file without content exists
22 assert:
23 that:
24 - empty_file_stat.stat.exists
25 fail_msg: "The file {{ remote_tmp }}/test_empty.txt does not exist."
26
27 - name: verify file without content is empty
28 assert:
29 that:
30 - empty_file_stat.stat.size == 0
31 fail_msg: "The file {{ remote_tmp }}/test_empty.txt is not empty."