Configuration

config.yaml

# Cumin main configuration
#
# By default Cumin load the configuration from /etc/cumin/config.yaml, but it can be overriden by command line argument
#
transport: clustershell  # Default transport to use, can be overriden by command line argument
log_file: logs/cumin.log  # Absolute or relative path for the log file
# If set, use this backend to parse the query first and only if it fails, fallback to parse it with the general
# multi-query grammar [optional]
default_backend: direct

# Environment variables that will be defined [optional]
environment:
    ENV_VARIABLE: env_value

# Backend-specific configurations [optional]
puppetdb:
    host: puppetdb.local
    port: 443
    urllib3_disable_warnings:  # List of Python urllib3 exceptions to ignore
        - SubjectAltNameWarning

openstack:
    auth_url: http://keystone.local:5000
    username: observer  # Keystone API user's username
    password: observer_password  # Keystone API user's password
    domain_suffix: openstack.local  # OpenStack managed domain, to be added to all hostnames
    nova_api_version: 2.12
    timeout: 2  # Used for both Keystone and Nova API calls
    # Default query parameters. The ones set by default anyway are: status: ACTIVE and vm_state: ACTIVE [optional]
    query_params:
        project: project_name  # Parameter name: parameter value

# Transport-specific configuration
clustershell:
    ssh_options:  # SSH options passed to ClusterShell [optional]
        - 'some_option'
    fanout: 16  # Max size of the sliding window of concurrent workers active at any given time [optional, default: 64]

aliases.yaml

# Cumin aliases configuration
#
# Cumin looks for an aliases.yaml file in the same directory of the loaded main configuration file.
# Aliases are resolved recursively at runtime, hence they can be nested.
# Aliases are defined in the form:
#     alias_name: query_ tring using the global grammar
#
alias_direct: D{host1 or host2}  # Use the direct backend
alias_puppetdb: P{R:Class = My::Class}  # Use the PuppetDB backend
alias_openstack: O{project:project_name}  # Use the OpenStack backend
alias_complex: A:alias_direct and (A:alias_puppetdb and not D{host3})  # Mix aliases and backend grammars