blob: a3e299003b012faea500d9481cdbcc428f743818 (
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
|
# ============================= Base Test Config ==============================
base_test_data:
script_timeout: 20
enabled: True
required_features: []
cloud_config: |
#cloud-config
collect_scripts:
cloud-init.log: |
#!/bin/sh
cat /var/log/cloud-init.log
cloud-init-output.log: |
#!/bin/sh
cat /var/log/cloud-init-output.log
instance-id: |
#!/bin/sh
cat /run/cloud-init/.instance-id
instance-data.json: |
#!/bin/sh
cat /run/cloud-init/instance-data.json
result.json: |
#!/bin/sh
cat /run/cloud-init/result.json
status.json: |
#!/bin/sh
cat /run/cloud-init/status.json
cloud-init-version: |
#!/bin/sh
dpkg-query -W -f='${Version}' cloud-init
system.journal.gz: |
#!/bin/sh
[ -d /run/systemd ] || { echo "not systemd."; exit 0; }
fail() { echo "ERROR:" "$@" 1>&2; exit 1; }
journal=""
for d in /run/log/journal /var/log/journal; do
for f in $d/*/system.journal; do
[ -f "$f" ] || continue
[ -z "$journal" ] ||
fail "multiple journal found: $f $journal."
journal="$f"
done
done
[ -f "$journal" ] || fail "no journal file found."
gzip --to-stdout "$journal"
# vi: ts=4 expandtab
|