summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_resolv_conf.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-10-04 16:44:29 -0400
committerScott Moser <smoser@brickies.net>2016-10-04 16:44:29 -0400
commitc83e19dc07b284f008120fb0c72439c5f91042ae (patch)
treea368cbb9170b2da6ffb623802580381b12bae4be /cloudinit/config/cc_resolv_conf.py
parent1bf130a7e1157d83f073131beaa92d3169255229 (diff)
parent94fd35eeb3f53bc82fb9ddcad60c1e605890fd53 (diff)
downloadvyos-cloud-init-c83e19dc07b284f008120fb0c72439c5f91042ae.tar.gz
vyos-cloud-init-c83e19dc07b284f008120fb0c72439c5f91042ae.zip
merge from master at 0.7.8-14-g94fd35e
Diffstat (limited to 'cloudinit/config/cc_resolv_conf.py')
-rw-r--r--cloudinit/config/cc_resolv_conf.py69
1 files changed, 39 insertions, 30 deletions
diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py
index 71d9e3a7..feea5653 100644
--- a/cloudinit/config/cc_resolv_conf.py
+++ b/cloudinit/config/cc_resolv_conf.py
@@ -18,36 +18,45 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Note:
-# This module is intended to manage resolv.conf in environments where
-# early configuration of resolv.conf is necessary for further
-# bootstrapping and/or where configuration management such as puppet or
-# chef own dns configuration. As Debian/Ubuntu will, by default, utilize
-# resovlconf, and similarly RedHat will use sysconfig, this module is
-# likely to be of little use unless those are configured correctly.
-#
-# For RedHat with sysconfig, be sure to set PEERDNS=no for all DHCP
-# enabled NICs. And, in Ubuntu/Debian it is recommended that DNS
-# be configured via the standard /etc/network/interfaces configuration
-# file.
-#
-#
-# Usage Example:
-#
-# #cloud-config
-# 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
-#
-
+"""
+Resolv Conf
+-----------
+**Summary:** configure resolv.conf
+
+This module is intended to manage resolv.conf in environments where early
+configuration of resolv.conf is necessary for further bootstrapping and/or
+where configuration management such as puppet or chef own dns configuration.
+As Debian/Ubuntu will, by default, utilize resovlconf, and similarly RedHat
+will use sysconfig, this module is likely to be of little use unless those
+are configured correctly.
+
+.. note::
+ For RedHat with sysconfig, be sure to set PEERDNS=no for all DHCP
+ enabled NICs.
+
+.. note::
+ And, in Ubuntu/Debian it is recommended that DNS be configured via the
+ standard /etc/network/interfaces configuration file.
+
+**Internal name:** ``cc_resolv_conf``
+
+**Module frequency:** per instance
+
+**Supported distros:** fedora, rhel, sles
+
+**Config keys**::
+
+ manage_resolv_conf: <true/false>
+ resolv_conf:
+ nameservers: ['8.8.4.4', '8.8.8.8']
+ searchdomains:
+ - foo.example.com
+ - bar.example.com
+ domain: example.com
+ options:
+ rotate: <true/false>
+ timeout: 1
+"""
from cloudinit import log as logging
from cloudinit.settings import PER_INSTANCE