Debian Codegraph @

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

raw
1 - name: valid template
2 shell: ulimit -n
3 vars:
4 ansible_python_module_rlimit_nofile: "{{ 123 }}"
5 register: result
6
7 - assert:
8 that:
9 - result.stdout | int == 123
10
11 - name: omit template
12 shell: ulimit -n
13 vars:
14 ansible_python_module_rlimit_nofile: "{{ omit }}"
15 register: result
16
17 - assert:
18 that:
19 - result.stdout | int == lookup('pipe', 'ulimit -n') | int
20
21 - name: undefined variable
22 shell: ulimit -n
23 vars:
24 ansible_python_module_rlimit_nofile: "{{ undefined_variable }}"
25 register: result
26 ignore_errors: yes
27
28 - assert:
29 that:
30 - result is failed
31 - result.msg is contains("undefined")