관리-도구
편집 파일: chroot.cpython-39.pyc
a �)g" � @ sb d dl mZmZmZ eZd dlZd dlm m m Z d dlm Z ddd�ZG dd� de �ZdS ) � )�absolute_import�division�print_functionN)�BaseFactCollectorc C s� d }t j�dd�rd}n�t �d�}z&t �d�}|j|jkpD|j|jk}W nl ty� d}| d ur�| �d�}|r�|dd dg}| �|�\}}} d |v r�d}nd|v r�d }|j|k}Y n0 |S )NZ debian_chrootFT�/z/proc/1/root/.� �statz-fz--format=%TZbtrfs� Zxfs� ) �os�environ�getr �st_ino�st_dev� ExceptionZget_bin_pathZrun_command) �module� is_chrootZmy_rootZ proc_rootZfs_root_inoZ stat_path�cmd�rc�out�err� r �L/usr/lib/python3.9/site-packages/ansible/module_utils/facts/system/chroot.pyr s( r c @ s$ e Zd ZdZedg�Zddd�ZdS )�ChrootFactCollector�chrootr Nc C s dt |�iS )Nr )r )�selfr Zcollected_factsr r r �collect0 s zChrootFactCollector.collect)NN)�__name__� __module__�__qualname__�name�setZ _fact_idsr r r r r r , s r )N)Z __future__r r r �typeZ __metaclass__r Z"ansible.module_utils.compat.typingZmodule_utils�compat�typing�tZ$ansible.module_utils.facts.collectorr r r r r r r �<module> s