| Server IP : 23.254.227.96 / Your IP : 216.73.216.183 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/cloudinit/config/__pycache__/ |
Upload File : |
3
��b � @ sh d Z ddlmZ ddlmZmZ ddlmZ eje �Z
eZddddd d
gZddd
�Z
dd� Zdd� ZdS )ax
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 resolvconf, and similarly Red Hat
will use sysconfig, this module is likely to be of little use unless those
are configured correctly.
.. note::
For Red Hat 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:** alpine, fedora, photon, 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
� )�log)� templater�util)�PER_INSTANCEZalpineZfedoraZopensuseZphotonZrhelZsleszresolv.confzsystemd.resolved.conf)z/etc/resolv.confz/etc/systemd/resolved.confc C s� g }g }d|krNx<|d j � D ],\}}t|t�r|r@|j|� q|j|� qW x|| D ]}|d |= qXW |jd�s|i |d<