-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathuinit.script
More file actions
72 lines (72 loc) · 1.33 KB
/
Copy pathuinit.script
File metadata and controls
72 lines (72 loc) · 1.33 KB
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
---
- name: Say hi
module: echo
args:
text: "Hi"
- name: Set foo = bar
module: setvar
args:
key: foo
value: bar
- name: Echo with a variable
module: echo
args:
text: "Foo = {{.foo}}"
- name: Read vars from cmdline.text
module: cmdline
args:
filename: ../../modules/cmdline/cmdline.txt
- name: Verify that key = value
module: echo
args:
text: "key = {{.key}}"
- name: Run ls
module: command
args:
cmd: ls -al
- name: uh....
module: echo
args:
text: "what's up?"
- name: Test environment variables
module: command
args:
cmd: ls -ld $LS_DIR
shell: true
env:
"LS_DIR": "/tmp"
- name: Loop test
module: echo
args:
text: "this is item {{.item}}"
loop:
- "a"
- "b"
- "c"
- name: Run sub-script with one task
module: script
args:
tasks:
- name: Echo something in a the subscript
module: echo
args:
text: "something"
- name: Run sub-script from file
module: script
args:
file: subscript.script
- name: Run a sub-script from file plus an extra task
module: script
args:
file: subscript.script
tasks:
- name: This is the extra task
module: echo
args:
text: "extra task..."
- name: Run ls via shell (exec)
module: command
args:
cmd: ls -l
shell: true
exec: true