|
PACKAGE CONTENTS group
host
CLASSES
__builtin__.object
Inventory
class Inventory(__builtin__.object)
| Create hosts and groups from inventory
|
| Retrieve the hosts and groups that ansible knows about from this> |
| Retrieve raw variables (non-expanded) from the Group and Host> | returned from here.
|
| Methods defined here:
|
| __init__(self, inventory_list='/etc/ansible/hosts')
| :kwarg inventory_list: A list of inventory sources. This may be file
| names which will be parsed as ini-like files, executable scripts
| which return inventory data as json, directories of both of the above,
| or hostnames. Files and directories are
| :kwarg vault_password: Password to use if any of the inventory sources
| are in an ansible vault
|
| add_group(self, group)
| Add a new group to the inventory
|
| basedir(self)
| What directory from which the inventory was read.
|
| get_group(self, groupname)
| Retrieve the Group object for a groupname
|
| get_groups(self)
| Retrieve the Group objects known to the Inventory
|
| get_host(self, hostname)
| Retrieve the Host object for a hostname
|
| get_hosts(self)
| Return the list of hosts, after filtering based on any set pattern
| and restricting the results based on the set host restrictions.
|
| is_file(self)
| Did inventory come from a file?
|
| :returns: True if the inventory is file based, False otherwise
|
| remove_host_restriction(self)
| Remove the restriction on hosts, if any.
|
| set_filter_pattern(self, pattern='all')
| Sets a pattern upon which hosts/groups will be filtered.
| This pattern can contain logical groupings such as unions,
| intersections and negations using special syntax.
|
| set_host_restriction(self, restriction)
| Restrict operations to hosts in the given list
|
| src(self)
| What's the complete path to the inventory file?
|
| :returns: Complete path to the inventory file. None if inventory is
| not file-based
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
| Retrieve the Host object for a hostname
|
| get_hosts(self)
| Return the list of hosts, after filtering based on any set pattern
| and restricting the results based on the set host restrictions.
|
| is_file(self)
| Did inventory come from a file?
|
| :returns: True if the inventory is file based, False otherwise
|
| remove_host_restriction(self)
| Remove the restriction on hosts, if any.
|
| set_filter_pattern(self, pattern='all')
| Sets a pattern upon which hosts/groups will be filtered.
| This pattern can contain logical groupings such as unions,
| intersections and negations using special syntax.
|
| set_host_restriction(self, restriction)
| Restrict operations to hosts in the given list
|
| src(self)
| What's the complete path to the inventory file?
|
| :returns: Complete path to the inventory file. None if inventory is
| not file-based
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
DATA
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0...
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192...
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0)... |
|