blob: 488f8cb2f57749548ba3372a8f4af9b7932459e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
- name: Start zuul stream daemon
hosts: node
tasks:
# NOTE : when new_console is set, this playbook runs with
# ZUUL_CONSOLE_PORT=19887 so that we test with the zuul_console
# from the Zuul checkout, and not the one started by test
# infrastructure.
- name: Start zuul_console on non-default port
zuul_console:
port: 19887
when: new_console | default(false)
- name: Run command to show skipping works
vars:
zuul_console_disabled: true
hosts: node
tasks:
- name: Run quiet command
command: echo 'This command should not stream'
- name: Run some commands to show that logging works
hosts: node
tasks:
- name: Run setup
setup:
register: setupvar
- name: Output ansible version
debug:
var: ansible_version
- name: Output debug for a var
debug:
var: setupvar
- name: Output a debug sentence
debug:
msg: This is a debug message
- name: Run a shell task
command: ip addr show
- name: Loop with items
command: "echo {{ item }}"
with_items:
- item1
- item2
- item3
- name: Loop with complex items
command: "echo {{ item.name }}"
with_items:
- name: complex1
- name: complex2
- name: complex3
- name: Run a task with an ansible python exception
zuul_fail:
key: task
failed_when: false
- name: Loop with items on an ansible python exception
zuul_fail:
key: loop
with_items:
- item1
- item2
- item3
failed_when: false
- name: Print binary data
command: echo -e '\x80abc'
- name: Find any console log files
find:
paths: /tmp
patterns: 'console-*.log'
register: _tmp_files
# We check this list in zuul-stream/functional.yaml to make sure
# we're cleaning up console log files.
- name: Dump tmp files
debug:
var: _tmp_files
|