File tree Expand file tree Collapse file tree 2 files changed +29
-11
lines changed Expand file tree Collapse file tree 2 files changed +29
-11
lines changed Original file line number Diff line number Diff line change 41
41
environment :
42
42
LD_LIBRARY_PATH : " {{pg_dst}}/lib/"
43
43
44
+ - name : copy transfers source
45
+ copy : src=../{{item}} dest=~/{{item}} mode=0755
46
+ with_items :
47
+ - " dtmbench.cpp"
48
+
49
+ - name : clone pqxx
50
+ git : repo=https://github.com/Ambrosys/pqxx.git
51
+ dest=~/pqxx
52
+ accept_hostkey=yes
53
+ update=no
54
+ force=yes
55
+ register : pqxx
56
+
57
+ - name : build pqxx
58
+ shell : " ./configure --prefix=/home/{{ansible_ssh_user}}/pg_cluster/install/ --enable-shared && make -j4 && make install"
59
+ args :
60
+ chdir : " ~/pqxx"
61
+ environment :
62
+ PATH : " /home/{{ansible_ssh_user}}/pg_cluster/install/bin/:{{ansible_env.PATH}}"
63
+ when : pqxx.changed
64
+
65
+ - name : compile dtmbench
66
+ shell : " g++ -g -Wall -O2 -o dtmbench dtmbench.cpp -lpqxx -lpq -pthread -L/home/{{ansible_ssh_user}}/pg_cluster/install/lib/ -I/home/{{ansible_ssh_user}}/pg_cluster/install/include/"
67
+
68
+ - name : move dtmbench to bin
69
+ shell : " mv dtmbench ~/pg_cluster/install/bin/dtmbench"
70
+
44
71
- hosts : nodes[0]
45
72
tasks :
46
73
- name : build dtmd
Original file line number Diff line number Diff line change 15
15
set_fact :
16
16
connections : " {{ connstrs.results | map(attribute='ansible_facts.connstr') | join }}"
17
17
18
- - name : copy transfers source
19
- copy : src=./{{item}} dest=~/{{item}} mode=0755
20
- with_items :
21
- - " dtmbench.cpp"
22
-
23
- - name : compile dtmbench
24
- shell : " g++ -g -Wall -O2 -o dtmbench dtmbench.cpp -lpqxx -lpq -pthread"
25
-
26
- - name : compile dtmbench
27
- shell : " mv dtmbench ~/pg_cluster/install/bin/dtmbench"
28
-
29
18
- hosts : clients[0]
30
19
gather_facts : no
31
20
tasks :
32
21
- name : init database
33
22
shell : " ~/pg_cluster/install/bin/dtmbench {{connections}} -a 500000 -i"
34
23
register : init_result
24
+ environment :
25
+ LD_LIBRARY_PATH : " /home/{{ansible_ssh_user}}/pg_cluster/install/lib"
35
26
- debug : var=init_result
36
27
37
28
- hosts : clients
You can’t perform that action at this time.
0 commit comments