commit | author | age | ||
1de623 | 1 | --- |
OB | 2 | - name: sample shell out |
3 | hosts: foobar | |
4 | remote_user: olbohlen | |
5 | vars: | |
6 | keyword: "10" | |
7 | tasks: | |
8 | - name: run a sample shell command | |
9 | shell: cal | |
10 | register: shell_out | |
11 | ||
12 | - name: debug shell_out | |
13 | debug: | |
14 | var: item | |
15 | loop: "{{ shell_out['stdout_lines'] }}" | |
16 | when: "keyword in item" | |
17 |