File tree Expand file tree Collapse file tree
iop_vulnerability/defaults Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 - role : pre_install
4646 - role : systemd_target
4747 - role : certificates
48+ - role : iop_network
49+ when :
50+ - " enabled_features | has_feature('iop')"
4851 - role : postgresql
4952 - role : valkey
5053 - role : candlepin
Original file line number Diff line number Diff line change 1010 certificates_ca_password : " CHANGEME"
1111 postgresql_ssl_crt : " {{ certificates_ca_directory }}/certs/{{ ansible_facts['fqdn'] }}.crt"
1212 postgresql_ssl_key : " {{ certificates_ca_directory }}/private/{{ ansible_facts['fqdn'] }}.key"
13+ # Dedicated DB host must accept connections from the application host.
14+ postgresql_publish :
15+ - " 5432:5432"
1316 vars_files :
1417 - " ../../../src/vars/defaults.yml"
1518 - " ../../../src/vars/flavors/{{ flavor }}.yml"
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ Advisor and vulnerability frontend assets are extracted from container images an
9696
9797### Databases
9898
99- IOP creates five PostgreSQL databases, all accessible to containers via ` host.containers.internal:5432 ` :
99+ IOP creates five PostgreSQL databases, all accessible to containers via the
100+ ` postgresql ` container on ` iop-core-network ` (` postgresql:5432 ` ):
100101
101102| Database | User |
102103| ----------| ------|
Original file line number Diff line number Diff line change 2626 certificate_checks_certificate : " {{ server_certificate }}"
2727 certificate_checks_key : " {{ server_key }}"
2828 certificate_checks_ca : " {{ server_ca_certificate }}"
29+ # IOP network must exist before Postgres joins it when IOP is enabled.
30+ - role : iop_network
31+ when :
32+ - " enabled_features | has_feature('iop')"
33+ - database_mode == 'internal'
2934 - role : postgresql
3035 when :
3136 - database_mode == 'internal'
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ iop_advisor_container_tag: "foreman-3.18"
55iop_advisor_database_name : advisor_db
66iop_advisor_database_user : advisor_user
77iop_advisor_database_password : " {{ undef(hint='Set a secure database password') }}"
8- iop_advisor_database_host : host.containers.internal
8+ iop_advisor_database_host : " {{ iop_database_host | default('postgresql') }} "
99iop_advisor_database_port : 5432
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ iop_inventory_container_tag: "foreman-3.18"
55iop_inventory_database_name : inventory_db
66iop_inventory_database_user : inventory_admin
77iop_inventory_database_password : " {{ undef(hint='Set a secure database password') }}"
8- iop_inventory_database_host : host.containers.internal
8+ iop_inventory_database_host : " {{ iop_database_host | default('postgresql') }} "
99iop_inventory_database_port : 5432
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ iop_remediation_container_tag: "foreman-3.18"
55iop_remediation_database_name : remediations_db
66iop_remediation_database_user : remediations_user
77iop_remediation_database_password : " {{ undef(hint='Set a secure database password') }}"
8- iop_remediation_database_host : " host.containers.internal "
8+ iop_remediation_database_host : " {{ iop_database_host | default('postgresql') }} "
99iop_remediation_database_port : " 5432"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ iop_vmaas_container_tag: "foreman-3.18"
55iop_vmaas_database_name : vmaas_db
66iop_vmaas_database_user : vmaas_admin
77iop_vmaas_database_password : " {{ undef(hint='Set a secure database password') }}"
8- iop_vmaas_database_host : " host.containers.internal "
8+ iop_vmaas_database_host : " {{ iop_database_host | default('postgresql') }} "
99iop_vmaas_database_port : " 5432"
1010
1111iop_vmaas_client_ca_certificate : " /var/lib/foremanctl/certs/certs/ca.crt"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ iop_vulnerability_container_tag: "foreman-3.18"
55iop_vulnerability_database_name : vulnerability_db
66iop_vulnerability_database_user : vulnerability_admin
77iop_vulnerability_database_password : " {{ undef(hint='Set a secure database password') }}"
8- iop_vulnerability_database_host : " host.containers.internal "
8+ iop_vulnerability_database_host : " {{ iop_database_host | default('postgresql') }} "
99iop_vulnerability_database_port : " 5432"
1010
1111# Taskomatic configuration
Original file line number Diff line number Diff line change 22postgresql_container_image : quay.io/sclorg/postgresql-16-c10s
33postgresql_container_tag : " latest"
44postgresql_container_name : postgresql
5- postgresql_network : host
65postgresql_restart_policy : always
76
87postgresql_data_dir : /var/lib/pgsql/data
@@ -13,4 +12,11 @@ postgresql_max_connections: 500
1312postgresql_shared_buffers : 512MB
1413postgresql_effective_cache_size : 1GB
1514
15+ # Bridge networking + localhost publish keeps 5432 off the LAN. When IOP is
16+ # enabled, also join iop-core-network so IOP containers can reach this
17+ # container by name instead of host.containers.internal.
18+ postgresql_networks : " {{ [iop_network_name | default('iop-core-network')] if (enabled_features | default([]) | has_feature('iop')) else [] }}"
19+ postgresql_publish :
20+ - " 127.0.0.1:5432:5432"
21+
1622postgresql_upgrade : " hardlink"
You can’t perform that action at this time.
0 commit comments