Debian Codegraph @

test/integration/targets/stacktrace_dump_remote/tasks/main.yml

raw
1 - name: Use custom module to send SIGUSR1 to AnsiballZ process
2 custom_module:
3 register: result
4
5 - debug:
6 msg: "Sent SIGUSR1 to {{ result.process_pid }}"
7
8 - name: Locate stacktrace dump file
9 find:
10 paths: "{{ result.trace_dir }}"
11 patterns: "ansible-{{ result.process_pid }}.debug"
12 register: found_files
13
14 - block:
15 - assert:
16 that:
17 - found_files.files | length == 1
18
19 - name: Read file contents
20 command: "cat {{ found_files.files[0].path }}"
21 register: file_contents
22
23 - set_fact:
24 msg1: "Process {{ result.process_pid }} stacktrace"
25
26 - assert:
27 that:
28 - msg1 in file_contents.stdout
29 - "'Thread stacktraces' in file_contents.stdout"
30
31 always:
32 - name: Remove stacktrace dump file
33 file:
34 path: "{{ found_files.files[0].path }}"
35 state: absent