HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/cloudinit/config/__pycache__/cc_update_hostname.cpython-310.pyc
o

x[h��
@s�UdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZdd	gegd
�Z
e
ed<e�e�Zded
edededdf
dd�ZdS)z)Update Hostname: Update hostname and fqdn�N)�util)�Cloud)�Config)�
MetaSchema)�
PER_ALWAYS�cc_update_hostname�all)�id�distros�	frequency�activate_by_schema_keys�meta�name�cfg�cloud�args�returnc
	Cs�t�|dd�rt�d|�dSt�|dd�}|dur!|j�d|�t�|dd�}|dur3|j�d|�t�||�\}}}|rI|dkrIt�d�dSztj�	|�
d�d	�}	t�d
||�|j�|||	�WdStyut�
td||��w)N�preserve_hostnameFzWConfiguration option 'preserve_hostname' is set, not updating the hostname in module %s�prefer_fqdn_over_hostname�create_hostname_file�	localhostz6Hostname is localhost. Let other services handle this.�datazprevious-hostnamezUpdating hostname to %s (%s)z(Failed to update the hostname to %s (%s))r�get_cfg_option_bool�LOG�debug�distro�
set_option�get_hostname_fqdn�os�path�join�	get_cpath�update_hostname�	Exception�logexc)
rrrr�
hostname_fqdnr�hostname�fqdn�
is_default�prev_fn�r*�E/usr/lib/python3/dist-packages/cloudinit/config/cc_update_hostname.py�handles<���
��r,)�__doc__�loggingr�	cloudinitr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.settingsrr
�__annotations__�	getLogger�__name__r�str�listr,r*r*r*r+�<module>s�
"