Vonng / pigsty

Battery-Included PostgreSQL Distro as a Free RDS Alternative
https://pigsty.io
GNU Affero General Public License v3.0
2.97k stars 241 forks source link

New parameters to control node etc hosts #385

Closed Vonng closed 2 months ago

Vonng commented 3 months ago

Docker VMs does not allow writing to /etc/hosts

We should have a new parameter (maybe node_write_hosts) to control that behavior.

Vonng commented 2 months ago

Adding a new parameter: node_write_etc_hosts

#--------------------------------------------------------------#
# Setup Node Static DNS Records                     [node_hosts]
#--------------------------------------------------------------#
- name: setup node dns
  tags: node_hosts
  when: node_write_etc_hosts|bool

Besides, if dns_enabled is false, the pgsql role should not write dns records

to infra nodes' /etc/hosts

Vonng commented 2 months ago

Resolved by https://github.com/Vonng/pigsty/commit/866fc8c2721b59604671554aa485e31fa2b5b40f