debug-vars
Example:
# Displays a the current users username and home directory. - debug-vars: vars: - ansible_env.HOME - ansible_env.USER
Description
Displays the content of an (internal) Ansible variable.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
list | -- | the Ansible variable name(s) to debug Required |
Examples
Example 1
Displays a the current users username and home directory.
Code
- debug-vars: vars: - ansible_env.HOME - ansible_env.USER
Code
doc: short_help: Displays the content of an (internal) Ansible variable. examples: - title: Displays a the current users username and home directory. vars: vars: - ansible_env.HOME - ansible_env.USER args: vars: type: list schema: type: string required: true doc: short_help: the Ansible variable name(s) to debug cli: param_type: argument meta: tags: - debug frecklets: - frecklet: type: ansible-module name: debug msg: 'display value of var(s): {{:: vars ::}}' idempotent: false become: false internet: false references: "'debug' Ansible module": https://docs.ansible.com/ansible/latest/modules/debug_module.html task: loop: '{{:: vars ::}}' vars: var: '{{ item }}'
frecklecute debug-vars --help Usage: frecklecute debug-vars [OPTIONS] VARS Displays the content of an (internal) Ansible variable. Options: --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.debug_vars.DebugVars # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class DebugVars(AutoPycklet): """Displays the content of an (internal) Ansible variable. Args: vars: the Ansible variable name(s) to debug """ FRECKLET_ID = "debug-vars" vars: List = None def __post_init__(self): super(DebugVars, self).__init__(var_names=["vars"]) frecklet_class = DebugVars
# -*- coding: utf-8 -*- # # module path: pycklets.debug_vars.DebugVars # from pyckles import AutoPycklet class DebugVars(AutoPycklet): """Displays the content of an (internal) Ansible variable. Args: vars: the Ansible variable name(s) to debug """ FRECKLET_ID = "debug-vars" def __init__(self, vars=None): super(DebugVars, self).__init__(var_names=["vars"]) self._vars = vars @property def vars(self): return self._vars @vars.setter def vars(self, vars): self._vars = vars frecklet_class = DebugVars