controlware.utils.default (1.0.4) — filter

This filter tests and return the given value if defined and not None. Otherwise check given other values and returns first defined and not None.

| "added in version" 1.0.0 of controlware.utils"

Authors: Korte Noack (@kornoa)

Install collection

Install with ansible-galaxy collection install controlware.utils:==1.0.4


Add to requirements.yml

  collections:
    - name: controlware.utils
      version: 1.0.4

Description

This filter tests and return the given value if defined and not None. Otherwise check given other values and returns first defined and not None. returns: type: any description: value or first non-None default_value

Inputs

    
values:
    description: Data to check
    required: true
    type: any

default_values:
    description: Single value or list of values to check as default values
    required: true
    type: any