Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.11/site-packages/ansible/modules/__pycache__/ |
Upload File : |
� ���c�B � � � d dl mZmZmZ eZdZdZdZd dl Z d dl Z d dlZd dlm Z d dlmZ G d� d e� � Z G d � de� � Z G d� d e� � Z G d� de� � Z G d� de� � Zd� Zedk r e� � dS dS )� )�absolute_import�division�print_functionak --- module: service_facts short_description: Return service state information as fact data description: - Return service state information as fact data for various service management utilities. version_added: "2.5" requirements: ["Any of the following supported init systems: systemd, sysv, upstart, openrc, AIX SRC"] extends_documentation_fragment: - action_common_attributes - action_common_attributes.facts attributes: check_mode: support: full diff_mode: support: none facts: support: full platform: platforms: posix notes: - When accessing the C(ansible_facts.services) facts collected by this module, it is recommended to not use "dot notation" because services can have a C(-) character in their name which would result in invalid "dot notation", such as C(ansible_facts.services.zuul-gateway). It is instead recommended to using the string value of the service name as the key in order to obtain the fact data value like C(ansible_facts.services['zuul-gateway']) - AIX SRC was added in version 2.11. author: - Adam Miller (@maxamillion) z� - name: Populate service facts ansible.builtin.service_facts: - name: Print service facts ansible.builtin.debug: var: ansible_facts.services a ansible_facts: description: Facts to add to ansible_facts about the services on the system returned: always type: complex contains: services: description: States of the services with service name as key. returned: always type: complex contains: source: description: - Init system of the service. - One of C(rcctl), C(systemd), C(sysv), C(upstart), C(src). returned: always type: str sample: sysv state: description: - State of the service. - 'This commonly includes (but is not limited to) the following: C(failed), C(running), C(stopped) or C(unknown).' - Depending on the used init system additional states might be returned. returned: always type: str sample: running status: description: - State of the service. - Either C(enabled), C(disabled), C(static), C(indirect) or C(unknown). returned: systemd systems or RedHat/SUSE flavored sysvinit/upstart or OpenBSD type: str sample: enabled name: description: Name of the service. returned: always type: str sample: arp-ethers.service N)� AnsibleModule)�get_best_parsable_localec � � e Zd Zd� ZdS )�BaseServicec � � || _ d S )N)�module)�selfr s �B/usr/lib/python3.11/site-packages/ansible/modules/service_facts.py�__init__zBaseService.__init__e s � ������ N)�__name__� __module__�__qualname__r � r r r r c s# � � � � � �� � � � r r c �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )�ServiceScanServicec �� � | j � d| j z � � \ }}}|dk r!t j � d� � sd S |dk r | j � d|�d|��� � t j dt j �� � }|� |� � D ]>}|� d � � }|� d � � dk rd}nd }||dd�||<