Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/connection/test_connection.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
11 ### raw with unicode arg and output
12
13 - name: raw with unicode arg and output
14 raw: echo 汉语
15 register: command
16 - name: check output of raw with unicode arg and output
17 assert:
18 that:
19 - "'汉语' in command.stdout"
20 - command is changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
21
22 ### copy local file with unicode filename and content
23
24 - name: create local file with unicode filename and content
25 local_action: lineinfile dest={{ local_tmp }}-汉语/汉语.txt create=true line=汉语
26 - name: remove remote file with unicode filename and content
27 action: "{{ action_prefix }}file path={{ remote_tmp }}-汉语/汉语.txt state=absent"
28 - name: create remote directory with unicode name
29 action: "{{ action_prefix }}file path={{ remote_tmp }}-汉语 state=directory"
30 - name: copy local file with unicode filename and content
31 action: "{{ action_prefix }}copy src={{ local_tmp }}-汉语/汉语.txt dest={{ remote_tmp }}-汉语/汉语.txt"
32
33 ### fetch remote file with unicode filename and content
34
35 - name: remove local file with unicode filename and content
36 local_action: file path={{ local_tmp }}-汉语/汉语.txt state=absent
37 - name: fetch remote file with unicode filename and content
38 fetch: src={{ remote_tmp }}-汉语/汉语.txt dest={{ local_tmp }}-汉语/汉语.txt fail_on_missing=true validate_checksum=true flat=true
39
40 ### remove local and remote temp files
41
42 - name: remove local temp file
43 local_action: file path={{ local_tmp }}-汉语 state=absent
44 - name: remove remote temp file
45 action: "{{ action_prefix }}file path={{ remote_tmp }}-汉语 state=absent"
46
47 ### test wait_for_connection plugin
48 - ansible.builtin.wait_for_connection: