Hardware

block_devices

host.fact.block_devices

Returns a dict of (mounted) block devices:

'/dev/sda1': {
    'available': '39489508',
    'used_percent': '3',
    'mount': '/',
    'used': '836392',
    'blocks': '40325900'
},
...

cpus

host.fact.cpus

Returns the number of CPUs on this server.

ipv4_addresses

host.fact.ipv4_addresses

Gets & returns a dictionary of network interface -> IPv4 address.

'eth0': '127.0.0.1',
...

ipv6_addresses

host.fact.ipv6_addresses

Gets & returns a dictionary of network interface -> IPv6 address.

'eth0': 'fe80::a00:27ff::2',
...

memory

host.fact.memory

Returns the memory installed in this server, in MB.

network_devices

host.fact.network_devices

Gets & returns a dict of network devices. See the ipv4_addresses and ipv6_addresses facts for easier-to-use shortcuts to get device addresses.

'eth0': {
    'ipv4': {
        'address': '127.0.0.1',
        'broadcast': '127.0.0.13',
        # Only one of these will exist:
        'netmask': '255.255.255.255',
        'mask_bits': '32'
    },
    'ipv6': {
        'address': 'fe80::a00:27ff:fec3:36f0',
        'mask_bits': '64'
    }
},
...