1
ˆ
908_•I|¥‰ÓMdœv ©ƒ&íK<óo¬ÇÆ Œ
Index of /FSS-BCZ/root/sys/module/tpm/parameters
Index of /FSS-BCZ/root/sys/module/tpm/parameters
$ ˆl–Ðz¾”Ji?u4 ^¸ËwÒ˜´oÊ
„_h?ÉÈÇ ?÷ #!/usr/bin/env python
# Copyright: (c) 2014, Nandor Sivok
# Copyright: (c) 2016, Redhat Inc
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI
import atexit
import cmd
import getpass
import readline
import os
import sys
from ansible import constants as C
from ansible import context
from ansible.cli.arguments import option_helpers as opt_help
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.parsing.convert_bool import boolean
from ansible.parsing.splitter import parse_kv
from ansible.playbook.play import Play
from ansible.plugins.list import list_plugins
from ansible.plugins.loader import module_loader, fragment_loader
from ansible.utils import plugin_docs
from ansible.utils.color import stringc
from ansible.utils.display import Display
display = Display()
class ConsoleCLI(CLI, cmd.Cmd):
'''
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
'''
name = 'ansible-console'
modules = [] # type: list[str] | None
ARGUMENTS = {'host-pattern': '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.'}
# use specific to console, but fallback to highlight for backwards compatibility
NORMAL_PROMPT = C.COLOR_CONSOLE_PROMPT or C.COLOR_HIGHLIGHT
def __init__(self, args):
super(ConsoleCLI, self).__init__(args)
self.intro = 'Welcome to the ansible console. Type help or ? to list commands.\n'
self.groups = []
self.hosts = []
s