debug-var

Example:

# Display the currents user home directory.
- debug-var:
    var: ansible_env.HOME

Description

Displays the content of an (internal) Ansible variable.

Variables

Name Type Default Description

var

string --

The Ansible variable name to debug. Required

Examples

Example 1

Display the currents user home directory.

Code
- debug-var:
    var: ansible_env.HOME

Code

doc:
  short_help: Displays the content of an (internal) Ansible variable.
  examples:
  - title: Display the currents user home directory.
    vars:
      var: ansible_env.HOME

args:
  var:
    type: string
    required: true
    doc:
      short_help: The Ansible variable name to debug.
    cli:
      param_type: argument

meta:
  tags:
  - debug

frecklets:
- frecklet:
    type: ansible-module
    name: debug
    desc:
      short: 'display value of var: {{:: var ::}}'
      references:
        "'debug' Ansible module": https://docs.ansible.com/ansible/latest/modules/debug_module.html
    properties:
      idempotent: false
      become: false
      internet: false
  vars:
    var: '{{:: var ::}}'
frecklecute debug-var --help

Usage: frecklecute debug-var [OPTIONS] VAR

  Displays the content of an (internal) Ansible variable.

Options:
  --help  Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.debug_var.DebugVar
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class DebugVar(AutoPycklet):
    """Displays the content of an (internal) Ansible variable.

       Args:
         var: The Ansible variable name to debug.

    """

    FRECKLET_ID = "debug-var"

    var: str = None


    def __post_init__(self):
        super(DebugVar, self).__init__(var_names=["var"])


frecklet_class = DebugVar
# -*- coding: utf-8 -*-


#
# module path: pycklets.debug_var.DebugVar
#


from pyckles import AutoPycklet

class DebugVar(AutoPycklet):
    """Displays the content of an (internal) Ansible variable.

       Args:
         var: The Ansible variable name to debug.

    """

    FRECKLET_ID = "debug-var"

    def __init__(self, var=None):

        super(DebugVar, self).__init__(var_names=["var"])
        self._var = var

    @property
    def var(self):
        return self._var

    @var.setter
    def var(self, var):
        self._var = var



frecklet_class = DebugVar