ansible_sdk.model.job_def module

class ansible_sdk.model.job_def.AnsibleJobDef(*args, **kwargs)

Bases: _DataclassReplaceMixin

Common Ansible job definition values

Parameters:
  • data_dir – path to a directory structure containing the Ansible project content and inventory.

  • playbook – relative path or FQCN of a playbook to run under data_dir

  • inventory – relative path to inventory file(s) or directory under data_dir, analogue to Ansible’s -i option

  • extra_vars – dictionary of variables for highest precedence level, analogue to Ansible’s -e option

  • env_vars – Environment variables to be used when running Ansible.

  • verbosity – None for default verbosity or 1-5, equivalent to Ansible’s -v options

  • limit – Matches Ansible’s --limit parameter to further constrain the inventory to be used

  • ident – The run identifier for this invocation of Runner. Will be used to create and name the artifact directory holding the results of the invocation.

  • forks – Control Ansible parallel concurrency

  • module – The module that will be invoked in ad-hoc mode by runner when executing Ansible.

  • module_args – The module arguments that will be supplied to ad-hoc mode.

  • host_pattern – The host pattern to match when running in ad-hoc mode.

  • timeout – The timeout value in seconds that will be passed to subprocess invocation while executing command. It the timeout is triggered it will force cancel the execution.

  • role – Name of the role to execute.

  • roles_path – Directory or list of directories to assign to ANSIBLE_ROLES_PATH

  • metrics_output_path – A path to directory to collect metrics

data_dir: str
env_vars: dict[str, t.Any]
extra_vars: dict[str, t.Any]
forks: int | None = None
host_pattern: str | None = None
ident: str | None = None
inventory: str | list[str] | None = None
limit: str | None = None
metrics_output_path: str | None = None
module: str | None = None
module_args: str | None = None
playbook: str
role: str | None = None
roles_path: str | list[str] | None = None
timeout: int | None = None
verbosity: int | None = None