debug-home-dir
Example:
# Display the currents user home directory. - debug-home-dir: var: ansible_env.HOME
Description
The user has to exist already on the target.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The name of the user. Required |
Examples
Example 1
Display the currents user home directory.
Code
- debug-home-dir: var: ansible_env.HOME
Code
doc: short_help: Registers the home directory of a user on the target system. help: | The user has to exist already on the target. examples: - title: Display the currents user home directory. vars: var: ansible_env.HOME args: user: type: string required: true doc: short_help: The name of the user. cli: param_type: argument meta: tags: - debug frecklets: - frecklet: type: ansible-tasklist name: set-user-home-dir-var.at.yml resources: ansible-tasklist: set-user-home-dir-var.at.yml desc: short: "get home directory for user '{{:: user ::}}'" properties: idempotent: false become: false internet: false vars: __user_name__: '{{:: user ::}}' __target_var_name__: 'home_dir_{{:: user ::}}' - debug-var: var: 'home_dir_{{:: user ::}}'
frecklecute debug-home-dir --help Usage: frecklecute debug-home-dir [OPTIONS] USER The user has to exist already on the target. Options: --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.debug_home_dir.DebugHomeDir # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class DebugHomeDir(AutoPycklet): """The user has to exist already on the target. Args: user: The name of the user. """ FRECKLET_ID = "debug-home-dir" user: str = None def __post_init__(self): super(DebugHomeDir, self).__init__(var_names=["user"]) frecklet_class = DebugHomeDir
# -*- coding: utf-8 -*- # # module path: pycklets.debug_home_dir.DebugHomeDir # from pyckles import AutoPycklet class DebugHomeDir(AutoPycklet): """The user has to exist already on the target. Args: user: The name of the user. """ FRECKLET_ID = "debug-home-dir" def __init__(self, user=None): super(DebugHomeDir, self).__init__(var_names=["user"]) self._user = user @property def user(self): return self._user @user.setter def user(self, user): self._user = user frecklet_class = DebugHomeDir