-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathgenerate-kcli-profiles.sh
executable file
·78 lines (73 loc) · 1.42 KB
/
generate-kcli-profiles.sh
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
#!/bin/bash
#Please see https://github.com/karmab/kcli
file="/root/kcli_profiles.yml"
# check if kcli script is available
if [ -z $(which kcli) ] ; then echo "Please install kcli"; exit ; fi
# check if the profiles file exists
if [ -e ${file} ] ; then rm -i ${file} ; else echo "Exit"; exit ; fi
# Place the profiles file
cat << EOF > ${file}
xsmall:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 1
memory: 256
nets:
- default
pool: default
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
small:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 1
memory: 512
nets:
- default
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
medium:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 1
memory: 1024
nets:
- default
disks:
- size: 16
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
big:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 2
memory: 2048
nets:
- default
disks:
- size: 32
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
xbig:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 2
memory: 3072
nets:
- default
disks:
- size: 32
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
xxbig:
template: CentOS-7-x86_64-GenericCloud.qcow2
numcpus: 4
memory: 4096
nets:
- default
disks:
- size: 32
cmds:
- echo testtest| passwd --stdin root
- yum -y install nmap
EOF