File: //usr/lib/python3.9/site-packages/ansible/cli/__pycache__/console.cpython-39.pyc
a
�)g�U � @ s0 d dl mZmZmZ eZd dlmZ d dlZd dl Z d dl
Z
d dlZd dlZd dl
Z
d dlmZ d dlmZ d dlmZ d dlmZ d dlmZmZ d d lmZ d d
lmZ d dlmZ d dl m!Z! d d
l"m#Z#m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* e*� Z+G dd� dee j,�Z-ddd�Z.e/dk�r,e.� dS )� )�absolute_import�division�print_function)�CLIN)� constants)�context)�option_helpers)�TaskQueueManager)� to_native�to_text)�boolean)�parse_kv)�Play)�list_plugins)�
module_loader�fragment_loader)�plugin_docs)�stringc)�Displayc s� e Zd ZdZdZg ZddiZejp&ej Z
� fdd�Z� fdd�Z� fd d
�Z
dd� Zd
d� Zdd� Zdd� Zdfdd�Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� ZeZeZd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Z d.d/� Z!d0d1� Z"d2d3� Z#d4d5� Z$d6d7� Z%d8d9� Z&d:d;� Z'd<d=� Z(d>d?� Z)d@dA� Z*dBdC� Z+dDdE� Z,dFdG� Z-dHdI� Z.dJdK� Z/dLdM� Z0dNdO� Z1dPdQ� Z2dRdS� Z3dTdU� Z4dVdW� Z5e4Z6e5Z7dXdY� Z8dZd[� Z9d\d]� Z:d^d_� Z;d`da� Z<� fdbdc�Z=ddde� Z>� Z?S )g�
ConsoleCLIa�
A REPL that allows for running ad-hoc tasks against a chosen inventory
from a nice shell with built-in tab completion (based on dominis'
ansible-shell).
It supports several commands, and you can modify its configuration at
runtime:
- `cd [pattern]`: change host/group (you can use host patterns eg.: app*.dc*:!app01*)
- `list`: list available hosts in the current path
- `list groups`: list groups included in the current path
- `become`: toggle the become flag
- `!`: forces shell module instead of the ansible module (!yum update -y)
- `verbosity [num]`: set the verbosity level
- `forks [num]`: set the number of forks
- `become_user [user]`: set the become_user
- `remote_user [user]`: set the remote_user
- `become_method [method]`: set the privilege escalation method
- `check [bool]`: toggle check mode
- `diff [bool]`: toggle diff mode
- `timeout [integer]`: set the timeout of tasks in seconds (0 to disable)
- `help [command/module]`: display documentation for the command or module
- `exit`: exit ansible-console
zansible-consolezhost-patternz�A name of a group in the inventory, a shell-like glob selecting hosts in inventory or any combination of the two separated by commas.c s� t t| ��|� d| _g | _g | _d | _d | _d | _t � | _
d| _d | _d | _
d | _d | _d | _d | _d | _d | _d | _tj�| � d S )NzAWelcome to the ansible console. Type help or ? to list commands.
�*)�superr �__init__Zintro�groups�hosts�pattern�variable_manager�loader�dict� passwords�cwd�remote_user�become�become_user�
become_method�
check_mode�diff�forks�task_timeout�collections�cmd�Cmd��self�args�� __class__� �7/usr/lib/python3.9/site-packages/ansible/cli/console.pyr H s&