Variables & Precedence•5 min read•Core Feature

Variables, Credentials & Field Mapping

Define host, inventory, and reusable variable sets, and understand the canonical ciel_* to ansible_* connection parameter mapping.

CIEL manages configuration values and credentials across host entities, inventory scopes, and reusable variable sets, projecting them into executable Ansible inventory structures at runtime.

Variable Sets Studio with Monaco YAML Editor and AES-256 Encryption

1. Variable Scopes in CIEL

Configuration variables can be applied at four distinct levels depending on required scope:

A. Host Entity Variables

  • Location: Defined on individual servers under Hosts (/hosts).
  • Use Case: Parameters specific to a single physical or virtual machine, such as a custom SSH port, unique network interface, or node ID.
  • Example:
    yaml
    cluster_node_id: 3
    bind_interface: "eth1"
    ciel_port: 2222

B. Inventory Variables

  • Location: Configured in an inventory workspace under the Variables tab.
  • Use Case: Shared configuration applied across all hosts assigned to that inventory group, such as common sudo privilege flags or regional internal mirrors.
  • Example:
    yaml
    ciel_become: true
    ciel_become_user: "root"
    ciel_python_interpreter: "/usr/bin/python3"

C. Reusable Variable Sets (/variables)

  • Location: Created and managed under Variable Sets (/variables).
  • Use Case: Named YAML or key-value bundles assigned across multiple playbooks, inventories, or scheduled runs without duplicating configuration.
  • Examples:
    • database-production: Database endpoints, replica hosts, connection pool sizes.
    • observability-agent: Prometheus scrape ports, Loki endpoints, retention limits.

D. Runtime Extra Variables

  • Location: Passed dynamically in the Run Options drawer, through webhook payloads, or via automated schedules.
  • Use Case: Ephemeral deployment overrides (e.g. app_version: "v2.1.0", migration_dry_run: true). Runtime extra variables take absolute precedence over all static scopes.

2. Canonical ciel_* Variable Mapping

When compiling inventory data for Ansible execution, CIEL automatically translates canonical ciel_* variables into standard Ansible connection variables (documented in the Ansible Connection Methods & Details Guide). You can use either naming convention interchangeably:

Connection & Authentication

CIEL VariableAnsible ParameterDescription
ciel_connectionansible_connectionConnection plugin (ssh, winrm, local)
ciel_hostansible_hostTarget IP address or hostname
ciel_portansible_portRemote connection port (e.g. 22 or 5986)
ciel_useransible_userLogin username for remote access
ciel_passwordansible_passwordPassword for SSH or WinRM authentication

SSH Options & Keys

CIEL VariableAnsible ParameterDescription
ciel_keyansible_ssh_private_key_fileExplicit path to SSH private key
ciel_ssh_common_argsansible_ssh_common_argsArguments passed to ssh, sftp, and scp
ciel_ssh_extra_argsansible_ssh_extra_argsExtra arguments passed to ssh only
ciel_ssh_pipeliningansible_ssh_pipeliningEnable or disable SSH pipelining (boolean)
ciel_ssh_timeoutansible_ssh_timeoutSSH connection timeout in seconds

Privilege Escalation (Become)

CIEL VariableAnsible ParameterDescription
ciel_becomeansible_becomeEnable privilege escalation (true or false)
ciel_become_useransible_become_userTarget privilege user (defaults to root)
ciel_become_methodansible_become_methodEscalation method (sudo, su, runas)
ciel_become_passwordansible_become_passwordSudo or escalation password
ciel_become_flagsansible_become_flagsFlags passed to the become command

Python Interpreter & Shell

CIEL VariableAnsible ParameterDescription
ciel_python_interpreteransible_python_interpreterTarget Python binary path (or auto_silent)
ciel_shell_typeansible_shell_typeTarget shell type (sh, bash, powershell)
ciel_shell_executableansible_shell_executableAbsolute path to target shell

Windows WinRM & Networking

CIEL VariableAnsible ParameterDescription
ciel_winrm_transportansible_winrm_transportWinRM transport (ntlm, ssl, basic)
ciel_winrm_server_cert_validationansible_winrm_server_cert_validationValidation policy (validate or ignore)
ciel_winrm_schemeansible_winrm_schemeConnection scheme (http or https)
ciel_network_osansible_network_osOperating system for network hardware modules

3. Secret Variables and Masking

For sensitive values such as database passwords, API tokens, and sudo credentials:

  • Granular isSecret Toggle: In the variable mapping editor, toggle the secret flag on individual keys. Only marked keys are treated as confidential; other configuration values remain visible in plaintext.
  • Encryption at Rest: Sensitive values are encrypted using AES-256-GCM before writing to the database.
  • Projection Masking: In the inventory YAML preview and API responses delivered to unauthorized users, secret variable values are replaced with ********.
  • Runtime Resolution: The execution engine decrypts secret variables only when assembling the execution environment for an active job, passing them to the runner process without exposing them in unprivileged logs.

4. External References

For upstream Ansible parameter documentation and connection behavior: