summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-01-25 17:11:33 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-01-25 17:11:33 -0800
commitd9fe11ca2bef6860847c8fba5dad7a7a34ed3faf (patch)
treeba77e18272046140e67b02db70f95d4ecac9f40d /doc/examples
parent769419522585ff4c93f6d2c71990b137757f6a32 (diff)
parent94c37c074aed4036160881f4f3a28d35f868d006 (diff)
downloadvyos-cloud-init-d9fe11ca2bef6860847c8fba5dad7a7a34ed3faf.tar.gz
vyos-cloud-init-d9fe11ca2bef6860847c8fba5dad7a7a34ed3faf.zip
Adding a resolv.conf configuration module (LP: #1100434)
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such. Note that when a config drive is used, and dhcp is not used that this module may not be applicable since in the RedHat based distros the config drive typically contains a ubuntu style network configuration which contains nameservers that can be used in /etc/resolv.conf, but for other types of datasources it is useful to have a module which can be specifically configured to write out /etc/resolv.conf
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/cloud-config-resolv-conf.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/examples/cloud-config-resolv-conf.txt b/doc/examples/cloud-config-resolv-conf.txt
new file mode 100644
index 00000000..37ffc91a
--- /dev/null
+++ b/doc/examples/cloud-config-resolv-conf.txt
@@ -0,0 +1,20 @@
+#cloud-config
+#
+# This is an example file to automatically configure resolv.conf when the
+# instance boots for the first time.
+#
+# Ensure that your yaml is valid and pass this as user-data when starting
+# the instance. Also be sure that your cloud.cfg file includes this
+# configuration module in the appropirate section.
+#
+manage-resolv-conf: true
+
+resolv_conf:
+ nameservers: ['8.8.4.4', '8.8.8.8']
+ searchdomains:
+ - foo.example.com
+ - bar.example.com
+ domain: example.com
+ options:
+ rotate: true
+ timeout: 1