|
| 1 | +--- |
| 2 | + |
| 3 | +-hosts:nodes |
| 4 | + |
| 5 | +roles: |
| 6 | + |
| 7 | + -role:postgres |
| 8 | +pg_port:15432 |
| 9 | +pg_repo:https://github.com/kelvich/postgresql.git |
| 10 | +pg_version_tag:xtm_patched |
| 11 | +pg_destroy_and_init:true |
| 12 | +pg_datadir:./postgrespro-data |
| 13 | + |
| 14 | +tasks: |
| 15 | + |
| 16 | + -name:clone dtm sources |
| 17 | +git:repo=https://github.com/kelvich/pg_tsdtm.git |
| 18 | +dest=./pg_tsdtm |
| 19 | +accept_hostkey=yes |
| 20 | +update=yes |
| 21 | +force=yes |
| 22 | +register:dtm_sources |
| 23 | + |
| 24 | + -name:build dtm |
| 25 | +shell:"PG_CONFIG={{pg_dst}}/bin/pg_config make clean && PG_CONFIG={{pg_dst}}/bin/pg_config make -j {{makejobs}} install" |
| 26 | +args: |
| 27 | +chdir:./pg_tsdtm |
| 28 | +when:dtm_sources.changed |
| 29 | + |
| 30 | + -name:enable dtm extension on datanodes |
| 31 | +lineinfile: |
| 32 | +dest:"{{pg_datadir}}/postgresql.conf" |
| 33 | +regexp:"^shared_preload_libraries" |
| 34 | +line:"shared_preload_libraries = 'pg_dtm'" |
| 35 | +state:present |
| 36 | + |
| 37 | + -name:restart postgrespro |
| 38 | +command:"{{pg_dst}}/bin/pg_ctl restart -w -D ./postgrespro-data -l ./postgrespro-data/pg.log" |