|
22 | 22 | title 'PostgreSQL Server Configuration' |
23 | 23 |
|
24 | 24 | # inputs |
25 | | -USER = input( |
26 | | - 'user', |
27 | | - description: 'define the postgresql user to access the database', |
28 | | - value: 'postgres' |
29 | | -) |
30 | | - |
31 | | -PASSWORD = input( |
32 | | - 'password', |
33 | | - description: 'define the postgresql password to access the database', |
34 | | - value: 'iloverandompasswordsbutthiswilldo' |
35 | | -) |
36 | | - |
37 | | -POSTGRES_DATA = input( |
38 | | - 'postgres_data', |
39 | | - description: 'define the postgresql data directory', |
40 | | - value: postgres.data_dir |
41 | | -) |
42 | | - |
43 | | -POSTGRES_CONF_DIR = input( |
44 | | - 'postgres_conf_dir', |
45 | | - description: 'define the postgresql configuration directory', |
46 | | - value: postgres.conf_dir |
47 | | -) |
48 | | - |
49 | | -POSTGRES_CONF_PATH = input( |
50 | | - 'postgres_conf_path', |
51 | | - description: 'define path for the postgresql configuration file', |
52 | | - value: File.join(POSTGRES_CONF_DIR.to_s, 'postgresql.conf') |
53 | | -) |
54 | | - |
55 | | -POSTGRES_HBA_CONF_FILE = input( |
56 | | - 'postgres_hba_conf_file', |
57 | | - description: 'define path for the postgresql configuration file', |
58 | | - value: File.join(POSTGRES_CONF_DIR.to_s, 'pg_hba.conf') |
59 | | -) |
60 | | - |
61 | | -POSTGRES_LOG_DIR = input( |
62 | | - 'postgres_log_dir', |
63 | | - description: 'define path for the postgresql log file', |
64 | | - value: '/var/log/postgresql' |
65 | | -) |
| 25 | +USER = input('user', value: 'postgres') |
| 26 | +PASSWORD = input('password', value: 'iloverandompasswordsbutthiswilldo') |
| 27 | +POSTGRES_DATA = input('postgres_data', value: postgres.data_dir) |
| 28 | +POSTGRES_CONF_DIR = input('postgres_conf_dir', value: postgres.conf_dir) |
| 29 | +POSTGRES_CONF_PATH = input('postgres_conf_path', value: File.join(POSTGRES_CONF_DIR.to_s, 'postgresql.conf')) |
| 30 | +POSTGRES_HBA_CONF_FILE = input('postgres_hba_conf_file', value: File.join(POSTGRES_CONF_DIR.to_s, 'pg_hba.conf')) |
| 31 | +POSTGRES_LOG_DIR = input('postgres_log_dir', value: '/var/log/postgresql') |
66 | 32 |
|
67 | 33 | only_if do |
68 | 34 | command('psql').exist? |
|
0 commit comments