|
6 | 6 | # |
7 | 7 | # $database_backend:: 'sqlite' or 'postgres' |
8 | 8 | # |
| 9 | +# $manage_postgresql:: If the PostgreSQL database should be managed |
| 10 | +# |
9 | 11 | # $postgresql_host:: Host of the postgres database. |
10 | 12 | # |
11 | 13 | # $postgresql_port:: Port of the postgres database. |
|
37 | 39 | String $database_backend = 'postgres', |
38 | 40 | Stdlib::Absolutepath $sqlite_db_path = '/var/lib/foreman-proxy/smart_proxy_container_gateway.db', |
39 | 41 | Optional[Integer] $sqlite_timeout = undef, |
| 42 | + Boolean $manage_postgresql = true, |
40 | 43 | Stdlib::Host $postgresql_host = 'localhost', |
41 | 44 | Stdlib::Port $postgresql_port = 5432, |
42 | 45 | String $postgresql_database = 'container_gateway', |
|
49 | 52 | feature => 'Container_Gateway', |
50 | 53 | listen_on => $listen_on, |
51 | 54 | } |
52 | | - include postgresql::server |
53 | | - postgresql::server::db { $foreman_proxy::plugin::container_gateway::postgresql_database: |
54 | | - user => $foreman_proxy::plugin::container_gateway::postgresql_user, |
55 | | - password => postgresql::postgresql_password( |
56 | | - $foreman_proxy::plugin::container_gateway::postgresql_user, |
57 | | - $foreman_proxy::plugin::container_gateway::postgresql_password |
58 | | - ), |
59 | | - encoding => 'utf8', |
60 | | - locale => 'en_US.utf8', |
61 | | - require => Package['glibc-langpack-en'], |
| 55 | + |
| 56 | + if $foreman_proxy::plugin::container_gateway::manage_postgresql { |
| 57 | + include postgresql::server |
| 58 | + postgresql::server::db { $foreman_proxy::plugin::container_gateway::postgresql_database: |
| 59 | + user => $foreman_proxy::plugin::container_gateway::postgresql_user, |
| 60 | + password => postgresql::postgresql_password( |
| 61 | + $foreman_proxy::plugin::container_gateway::postgresql_user, |
| 62 | + $foreman_proxy::plugin::container_gateway::postgresql_password |
| 63 | + ), |
| 64 | + encoding => 'utf8', |
| 65 | + locale => 'en_US.utf8', |
| 66 | + require => Package['glibc-langpack-en'], |
| 67 | + } |
62 | 68 | } |
63 | 69 | } |
0 commit comments