def __init__(<EOL>self, servers,<EOL>ignore_unreachable=False,<EOL>ignore_errors=False,<EOL>host_key_checking=True,<EOL>sudo=False,<EOL>dry_run=False,<EOL>verbosity='<STR_LIT:info>',<EOL>environment=None,<EOL>strategy=None,<EOL>**options<EOL>):
if isinstance(servers, string_types):<EOL><INDENT>self.servers = servers.split(u'<STR_LIT:U+0020>')<EOL><DEDENT>else:<EOL><INDENT>self.servers = list(servers)<EOL><DEDENT>if '<STR_LIT>' not in options:<EOL><INDENT>for host, port in self.hosts_with_ports:<EOL><INDENT>if host in ('<STR_LIT:localhost>', '<STR_LIT:127.0.0.1>', '<STR_LIT>'):<EOL><INDENT>options['<STR_LIT>'] = '<STR_LIT>'<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>options['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT><DEDENT>if not ('<STR_LIT>' in options or '<STR_LIT>' in options):<EOL><INDENT>options['<STR_LIT>'] = sudo<EOL>options['<STR_LIT>'] = '<STR_LIT:root>'<EOL><DEDENT>assert '<STR_LIT>' not in options, """<STR_LIT>"""<EOL>options['<STR_LIT>'] = None<EOL>required_defaults = (<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>)<EOL>for default in required_defaults:<EOL><INDENT>if default not in options:<EOL><INDENT>options[default] = getattr(<EOL>C, '<STR_LIT>'.format(default.upper())<EOL>)<EOL><DEDENT><DEDENT>options['<STR_LIT>'] = options.get('<STR_LIT>', None)<EOL>options['<STR_LIT>'] = options.get('<STR_LIT>', None)<EOL>options['<STR_LIT>'] = options.get('<STR_LIT>', None)<EOL>options['<STR_LIT>'] = options.get('<STR_LIT>', None)<EOL>options['<STR_LIT>'] = options.get('<STR_LIT>', {})<EOL>options['<STR_LIT>'] = options.get('<STR_LIT>', False)<EOL>options['<STR_LIT>'] = VERBOSITY.get(verbosity)<EOL>options['<STR_LIT>'] = dry_run<EOL>if '<STR_LIT>' not in options:<EOL><INDENT>options['<STR_LIT>'] = {<EOL>'<STR_LIT>': (<EOL>options.get('<STR_LIT>') or options.get('<STR_LIT>')<EOL>),<EOL>'<STR_LIT>': (<EOL>options.get('<STR_LIT>') or options.get('<STR_LIT>')<EOL>)<EOL>}<EOL><DEDENT>self.host_key_checking = host_key_checking<EOL>self.options = options_as_class(options)<EOL>self._valid_return_codes = (<NUM_LIT:0>, )<EOL>self.ignore_unreachable = ignore_unreachable<EOL>self.ignore_errors = ignore_errors<EOL>self.environment = environment or {}<EOL>self.strategy = strategy<EOL>for runner in (ModuleRunner(m) for m in list_ansible_modules()):<EOL><INDENT>runner.hookup(self)<EOL><DEDENT>
:param servers:
    A list of servers or a string with space-delimited servers. The
    api instances will operate on these servers only. Servers which
    cannot be reached or whose use triggers an error are taken out
    of the list for the lifetime of the object.

    Examples of valid uses::

        api = Api(['web.example.org', 'db.example.org'])
        api = Api('web.example.org')
        api = Api('web.example.org db.example.org')

    Each server may optionally contain the port in the form of
    ``host:port``. If the host part is an ipv6 address you need to
    use the following form to specify the port: ``[host]:port``.

    For example::

        api = Api('remote.example.org:2222')
        api = Api('[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:1234')

    Note that there's currently no support for passing the same host
    more than once (like in the case of a bastion host). Ansible
    groups these kind of calls together and only calls the first
    server.

    So this won't work as expected::

        api = Api(['example.org:2222', 'example.org:2223'])

    As a work around you should define aliases for these hosts in your
    ssh config or your hosts file.

:param ignore_unreachable:
    If true, unreachable servers will not trigger an exception. They
    are however still taken out of the list for the lifetime of the
    object.

:param ignore_errors:
    If true, errors on servers will not trigger an exception. Servers
    who trigger an error are still ignored for the lifteime of the
    object.

:param sudo:
    If true, the commands run as root using sudo. This is a shortcut
    for the following::

        Api('example.org', become=True, become_user='root')

    If ``become`` or ``become_user`` are passed, this option is
    ignored!

:param sudo_pass:
    If given, sudo is invoked with the given password. Alternatively
    you can use Ansible's builtin password option (e.g.
    ``passwords={'become_pass': '***'}``).

:param remote_pass:
    Passwords are passed to ansible using the passwords dictionary
    by default (e.g. ``passwords={'conn_pass': '****'}``). Since this
    is a bit cumbersome and because earlier Suitable releases supported
    `remote_pass` this convenience argument exists.

    If `passwords` is passed, the `remote_pass` argument is ignored.

:param dry_run:
    Runs ansible in 'check' mode, where no changes are actually
    applied to the server(s).

:param verbosity:
    The verbosity level of ansible. Possible values:

    * ``debug``
    * ``info`` (default)
    * ``warn``
    * ``error``
    * ``critical``

:param environment:
    The environment variables which should be set during when
    a module is executed. For example::

        api = Api('example.org', environment={
            'PGPORT': '5432'
        })

:param strategy:
    The Ansible strategy to use. Defaults to None which lets Ansible
    decide which strategy it wants to use.

    Note that you need to globally install strategy plugins using
    :meth:`install_strategy_plugins` before using strategies provided
    by plugins.

:param host_key_checking:
    Set to false to disable host key checking.

:param extra_vars:

    Extra variables available to Ansible. Note that those will be
    global and not bound to any particular host::

        api = Api('webserver', extra_vars={'home': '/home/denis'})
        api.file(dest="{{ home }}/.zshrc", state='touch')

    This can be used to specify an alternative Python interpreter::

        api = Api('example.org', extra_vars={
            'ansible_python_interpreter': '/path/to/interpreter'
        })

:param ``**options``:
    All remining keyword arguments are passed to the Ansible
    TaskQueueManager. The available options are listed here:

    `<http://docs.ansible.com/ansible/developing_api.html>`_