This repository was archived by the owner on Apr 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRexfile
More file actions
61 lines (42 loc) · 1.16 KB
/
Rexfile
File metadata and controls
61 lines (42 loc) · 1.16 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
use Rex -feature => ['1.3', 'exit_status'];
use Rex::CMDB;
use Rex::Transaction;
use Rex::Hardware;
use Rex::Group::Lookup::INI;
use Data::Dumper;
use Rex::Commands::Gather
# read the server.ini file and create the server groups
groups_file "servers.ini";
# Load authentication
set cmdb => {
type => 'YAML',
path => [
'cmdb/{hostname}.yml',
'cmdb/default.yml',
],
merge_behavior => 'LEFT_PRECEDENT',
};
# read all .task files in the folder Rexfile.d
do "Rexfile.d/$_" for (grep { m/\.task$/ } list_files("Rexfile.d/"));
# task which will install the tasks below on the group "rootserver"
task "rollout",group => "rootserver", sub {
transaction {
do_task [
# update the system before package installation
"update_system",
# install the given packages
"install",
# configure the system
"configure",
# install the owncloud compose file
"compose_owncloud",
# install the monitoring compose file
"compose_monitoring",
# install the jd2 compose file
"compose_jd2",
# finish the installation
"finish",
];
};
};
1;