Debian Codegraph @

ansible_collections/community/proxmox/tests/integration/targets/connection_proxmox_pct_remote/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 serial: 1
9 tasks:
10 - name: create file without content
11 copy:
12 content: ""
13 dest: "{{ remote_tmp }}/test_empty.txt"
14 force: no
15 mode: '0644'
16
17 - name: assert file without content exists
18 stat:
19 path: "{{ remote_tmp }}/test_empty.txt"
20 register: empty_file_stat
21
22 - name: verify file without content exists
23 assert:
24 that:
25 - empty_file_stat.stat.exists
26 fail_msg: "The file {{ remote_tmp }}/test_empty.txt does not exist."
27
28 - name: verify file without content is empty
29 assert:
30 that:
31 - empty_file_stat.stat.size == 0
32 fail_msg: "The file {{ remote_tmp }}/test_empty.txt is not empty."