diff options
author | Adam Dobrawy <ad-m@users.noreply.github.com> | 2020-07-07 15:20:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 09:20:11 -0400 |
commit | d373a8e1ae602c98bf89dc962d0d2a27815fb183 (patch) | |
tree | 8471ff74b93fdd24ad4a1504e45a7a0ff57789ad | |
parent | 411dbbebd328163bcb1c676cc711f3e5ed805375 (diff) | |
download | vyos-cloud-init-d373a8e1ae602c98bf89dc962d0d2a27815fb183.tar.gz vyos-cloud-init-d373a8e1ae602c98bf89dc962d0d2a27815fb183.zip |
Add update_etc_hosts as default module on *BSD (#479)
* Add update_etc_hosts as default module on *BSD
* Set preference of IPv6 over IPv4 in FreeBSD /etc/hosts
-rw-r--r-- | config/cloud.cfg.tmpl | 2 | ||||
-rw-r--r-- | templates/hosts.freebsd.tmpl | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl index 1bb97f83..b44cbce7 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl @@ -70,8 +70,8 @@ cloud_init_modules: {% endif %} - set_hostname - update_hostname -{% if variant not in ["freebsd", "netbsd"] %} - update_etc_hosts +{% if not variant.endswith("bsd") %} - ca-certs - rsyslog {% endif %} diff --git a/templates/hosts.freebsd.tmpl b/templates/hosts.freebsd.tmpl index 7ded762f..5cd5d3bc 100644 --- a/templates/hosts.freebsd.tmpl +++ b/templates/hosts.freebsd.tmpl @@ -11,14 +11,13 @@ you need to add the following to config: # a.) make changes to the master file in /etc/cloud/templates/hosts.freebsd.tmpl # b.) change or remove the value of 'manage_etc_hosts' in # /etc/cloud/cloud.cfg or cloud-config from user-data -# -# The following lines are desirable for IPv4 capable hosts -127.0.0.1 {{fqdn}} {{hostname}} -127.0.0.1 localhost.localdomain localhost -127.0.0.1 localhost4.localdomain4 localhost4 # The following lines are desirable for IPv6 capable hosts ::1 {{fqdn}} {{hostname}} ::1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 +# The following lines are desirable for IPv4 capable hosts +127.0.0.1 {{fqdn}} {{hostname}} +127.0.0.1 localhost.localdomain localhost +127.0.0.1 localhost4.localdomain4 localhost4 |