IF Commons GitHub

dialect

Written to: 6 requirements: 6 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-ansible-dialect FR-001, 0002-ansible-dialect FR-002, 0002-ansible-dialect FR-003, 0002-ansible-dialect FR-004, 0002-ansible-dialect FR-005, 0002-ansible-dialect FR-006

The dialect of Archon for Ansible: what it guarantees (as data), how it renders an order and its plan to an inventory, a configuration and a playbook of the modules of ansible-core (never a collection, so that the tool alone is pinned), and the steps that check, with the difference, and apply. The machine converges itself (the connection is local), which is the default preset of Archon; a controller that cannot run Ansible is not asked to. What it renders is generated and never edited. Check mode gives exit 0 even where something would change, so the playbook ends, in check mode, with a task that fails where any task would have changed or could not be checked, and that exit (2) is what the step names as the change.

import { ansible, KINDS_CARRIED } from "./dialect.ts";
ansible().tool.name; // "ansible-core"
KINDS_CARRIED.includes("package"); // true

Source: commons/archon-dialect-ansible/src/dialect.ts

5 of 7 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

DIALECT_IDconst
const DIALECT_ID: "ansible"

The id of the dialect.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

PINNED_VERSIONconst
const PINNED_VERSION: "2.16.3"

The version of ansible-core the dialect pins: the one of Ubuntu 24.04's archive. A fleet that pins another passes it.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

KINDS_CARRIEDconst
const KINDS_CARRIED: readonly ["package", "user", "group", "file", "directory", "service", "ssh-authorized-key", "system-setting"]

The kinds of resource the dialect carries out, with the shape of desired for each (see the specification).

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

kindsCarriedForfunction
function kindsCarriedFor(family: "arch" | "debian" | "rhel" | "suse"): readonly string[]

The kinds the dialect carries for a family: every kind where the family has a builtin module for its packages (apt for debian, dnf for rhel), and every kind but package for the families whose package modules are not in ansible-core (suse, arch): what is not carried is said where a requirement of it is rendered, and never left out.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

SETTINGS_CARRIEDconstno test imports it
const SETTINGS_CARRIED: readonly ["timezone", "locale", "keyboard"]

The names of system-setting the dialect carries, each by files only (no module of a collection): the time zone, the locale and the keyboard layout.

AnsibleOptionstypeno test imports it
type AnsibleOptions = { /** The version of ansible-core the machine must have (checked by the program that runs the st… (612 characters)
type AnsibleOptions = {
  /** The version of ansible-core the machine must have (checked by the program that runs the steps). */
  readonly version?: string;
  /** Whether the tasks raise their rights with sudo; no by default, because the machine converges itself as the user that runs it. */
  readonly become?: boolean;
  /** The family of the machine (0004-linux-observe-platform), which says the module that carries a package: `debian` by default. */
  readonly family?: Family;
  /** The folder, below the working folder, the render is written in; `.archon` by default. */
  readonly renderRoot?: string;
};

What a dialect is made with.

ansiblefunction
function ansible(options?: AnsibleOptions): Dialect

The dialect, as the port of Archon takes it.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.