Linux configuration management

Idempotent Ansible, Puppet, Chef, Salt and plain apt or dnf recipes that install, configure, verify, upgrade and remove the standalone DefenseClaw enterprise package on Linux.

Template

Checked by simulating the MDM execution context; not run in a live fleet. Pilot it on a small group first.

These recipes deploy the standalone profile to Linux hosts with a configuration-management tool. They install the defenseclaw-enterprise deb or rpm, and the package's lifecycle does the rest. The contract (exit codes, detection, config and key delivery) is in Install with an MDM. The tool recipes (Ansible, Puppet, Chef, Salt) follow the procedure below. The layout and units are in Linux.

The procedure every recipe follows

Every recipe does the same five idempotent steps, in this order:

  1. Stage the config. Write your administrator config to a root-only candidate file, /etc/mdm/defenseclaw/config.yaml (0600, in a 0700 folder). On a host with no DefenseClaw config yet, also write it to /etc/defenseclaw/config.yaml (owner root, 0640, in a 0755 folder), so the package applies it on the first install. Never overwrite that file afterwards.
  2. Install the package. Download it, check its SHA-256 against the release's cosign-verified checksums.txt, and install or upgrade it with the package manager. The postinstall step runs enterprise linux ensure --from-package and writes /var/lib/defenseclaw-enterprise/last-package-result.json. It never fails the package transaction, so the next step checks the result.
  3. Converge. Run /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux ensure --from-package --config /etc/mdm/defenseclaw/config.yaml --json. It applies the candidate config, repairs drift, or does nothing ("noop": true). Exit 0; 1 failed and rolled back (including config_invalid); 2 invalid arguments; 75 another lifecycle run holds the lock, retry.
  4. Store the key, if you use Cisco AI Defense, with enterprise secret set from your tool's secret store, on standard input or from a root-only file.
  5. Verify. enterprise linux verify --json is read-only and exits 1 when a file, permission, service or readiness check fails.

In bundle mode (bundle trust anchors installed), the config comes only from signed bundles and ensure --config refuses a different one with bundle_required. Otherwise, after the first install, change the config only through ensure --config: the lifecycle validates the candidate before it replaces /etc/defenseclaw/config.yaml and rolls back if applying fails. The recipes set only that file's owner and mode, never its group, so the tool and the lifecycle do not change it back and forth.

Tetragon

For computers that run Tetragon, Tetragon on a Linux fleet has tested plays that build on these steps.

Requirements

  • A systemd host (239 or later; Linux requirements). Without a running systemd the postinstall step does nothing.
  • Root on the host.
  • Your administrator config (choose the agents). The default config protects no agent.

Get and verify the release

On an administrator workstation, download the signed checksum list, check its signature and read the SHA-256 of each package you deploy. Those are the pins.

VERSION=X.Y.Z   # the release you deploy
BASE=https://github.com/cisco-ai-defense/defenseclaw/releases/download/$VERSION
curl -fsSL -O "$BASE/checksums.txt" -O "$BASE/checksums.txt.bundle"
cosign verify-blob --bundle checksums.txt.bundle \
  --certificate-identity "https://github.com/cisco-ai-defense/defenseclaw/.github/workflows/release.yaml@refs/heads/main" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt
grep "defenseclaw-enterprise-$VERSION-linux-" checksums.txt

The files are defenseclaw-enterprise-<version>-linux-<arch>.deb (Debian, Ubuntu), .rpm (RHEL family) and .tar.gz (payload), with <arch> amd64 or arm64. The packages carry no embedded signature: the pin from the verified checksums.txt proves them. This config is valid for Linux; replace it with your own:

config.yaml
config_version: 9
deployment_mode: managed_enterprise
data_dir: /var/lib/defenseclaw
policy_dir: /etc/defenseclaw/policies
enterprise:
  profile: standalone
gateway:
  api_bind: 127.0.0.1
  api_port: 18970
guardrail:
  enabled: true
  mode: observe
  connectors:
    claudecode: {}
    codex: {}

Each recipe follows the procedure every recipe follows: stage the config, install the package, converge with ensure, store the key, verify. Get and verify the release first, as shown above. Replace the X.Y.Z version and the <sha256> pins with your own. The example config used by every recipe is the one above.

Ansible

This play uses ansible.builtin modules only (copy, get_url, apt, dnf, command). Keep the key in Ansible Vault as vault_defenseclaw_ai_defense_key; the key task has no_log: true and sends the value on standard input.

defenseclaw.yml
- name: DefenseClaw standalone enterprise
  hosts: defenseclaw_linux
  become: true
  vars:
    defenseclaw_version: "X.Y.Z"
    # SHA-256 values from the release's cosign-verified checksums.txt
    defenseclaw_pins:              # one entry per architecture and format you deploy
      defenseclaw-enterprise-<version>-linux-amd64.deb: "<sha256>"
      defenseclaw-enterprise-<version>-linux-amd64.rpm: "<sha256>"
      defenseclaw-enterprise-<version>-linux-arm64.deb: "<sha256>"
      defenseclaw-enterprise-<version>-linux-arm64.rpm: "<sha256>"
    defenseclaw_arch: "{{ {'x86_64': 'amd64', 'aarch64': 'arm64'}[ansible_facts['architecture']] }}"
    defenseclaw_format: "{{ 'deb' if ansible_facts['pkg_mgr'] == 'apt' else 'rpm' }}"
    defenseclaw_package: "defenseclaw-enterprise-{{ defenseclaw_version }}-linux-{{ defenseclaw_arch }}.{{ defenseclaw_format }}"
    defenseclaw_gateway: /opt/defenseclaw/bin/defenseclaw-gateway
  tasks:
    - name: Create the root-only staging folder
      ansible.builtin.file:
        path: /etc/mdm/defenseclaw
        state: directory
        owner: root
        group: root
        mode: "0700"

    - name: Stage the candidate config
      ansible.builtin.copy:
        src: files/defenseclaw/config.yaml
        dest: /etc/mdm/defenseclaw/config.yaml
        owner: root
        group: root
        mode: "0600"

    - name: Create the config folder
      ansible.builtin.file:
        path: /etc/defenseclaw
        state: directory
        owner: root
        group: root
        mode: "0755"

    - name: Put the config in place before the first install
      ansible.builtin.copy:
        src: files/defenseclaw/config.yaml
        dest: /etc/defenseclaw/config.yaml
        owner: root
        mode: "0640"
        force: false

    - name: Download the package and check its SHA-256
      ansible.builtin.get_url:
        url: "https://github.com/cisco-ai-defense/defenseclaw/releases/download/{{ defenseclaw_version }}/{{ defenseclaw_package }}"
        dest: "/var/cache/{{ defenseclaw_package }}"
        checksum: "sha256:{{ defenseclaw_pins[defenseclaw_package] }}"
        owner: root
        group: root
        mode: "0644"

    # get_url checks the pin; this also covers a package copied from the controller.
    - name: Read the SHA-256 of the package
      ansible.builtin.stat:
        path: "/var/cache/{{ defenseclaw_package }}"
        checksum_algorithm: sha256
      register: defenseclaw_package_file

    - name: Refuse a package that does not match its pin
      ansible.builtin.assert:
        that: defenseclaw_package_file.stat.checksum == defenseclaw_pins[defenseclaw_package]
        fail_msg: "/var/cache/{{ defenseclaw_package }} does not match its SHA-256 pin"
        quiet: true

    - name: Install or upgrade the package (Debian, Ubuntu)
      ansible.builtin.apt:
        deb: "/var/cache/{{ defenseclaw_package }}"
      when: ansible_facts['pkg_mgr'] == 'apt'

    - name: Install or upgrade the package (RHEL family)
      ansible.builtin.dnf:
        name: "/var/cache/{{ defenseclaw_package }}"
        state: present
        # The rpm has no embedded signature; the SHA-256 check above proves it.
        disable_gpg_check: true
      when: ansible_facts['pkg_mgr'] in ['dnf', 'dnf5']

    - name: Apply the config and converge
      ansible.builtin.command:
        argv:
          - "{{ defenseclaw_gateway }}"
          - enterprise
          - linux
          - ensure
          - --from-package
          - --config
          - /etc/mdm/defenseclaw/config.yaml
          - --json
      register: defenseclaw_ensure
      until: defenseclaw_ensure.rc != 75
      retries: 5
      delay: 30
      changed_when: defenseclaw_ensure.rc == 0 and not (defenseclaw_ensure.stdout | from_json).noop
      failed_when: defenseclaw_ensure.rc != 0

    - name: Store the Cisco AI Defense key
      ansible.builtin.command:
        argv:
          - "{{ defenseclaw_gateway }}"
          - enterprise
          - secret
          - set
          - --name
          - ai-defense-api-key
          - --from-stdin
          - --json
        stdin: "{{ vault_defenseclaw_ai_defense_key }}"
      no_log: true
      register: defenseclaw_secret
      until: defenseclaw_secret.rc != 75
      retries: 5
      delay: 30
      changed_when: defenseclaw_secret.rc == 0 and not (defenseclaw_secret.stdout | from_json).noop
      failed_when: defenseclaw_secret.rc != 0
      when: vault_defenseclaw_ai_defense_key is defined

    - name: Verify the deployment
      ansible.builtin.command:
        argv: ["{{ defenseclaw_gateway }}", enterprise, linux, verify, --json]
      changed_when: false

Notes:

  • get_url skips the download when the file already matches the checksum, and apt and dnf change nothing when that version is installed.
  • The stat and assert tasks keep the pin when you replace get_url with copy, which checks no SHA-256.
  • The package has no embedded signature, so the dnf task sets disable_gpg_check and relies on the SHA-256 check.
  • enterprise secret set writes the key and runs ensure. Storing the same key again changes nothing.

Puppet

This class uses the core file, package and exec types (file, package, exec) and Sensitive for the key. Put the package and config.yaml in the module's files folder, and the key in Hiera as defenseclaw::ai_defense_key, encrypted with your Hiera backend.

manifests/defenseclaw.pp
class profile::defenseclaw (
  String $version = 'X.Y.Z',
  String $sha256 = '<sha256 of the package for this host>',
) {
  $arch = $facts['os']['architecture'] ? { 'aarch64' => 'arm64', 'arm64' => 'arm64', default => 'amd64' }
  $format = $facts['os']['family'] ? { 'Debian' => 'deb', default => 'rpm' }
  $provider = $format ? { 'deb' => 'dpkg', default => 'rpm' }
  $pkg = "defenseclaw-enterprise-${version}-linux-${arch}.${format}"
  $gateway = '/opt/defenseclaw/bin/defenseclaw-gateway'
  $ensure_once = "${gateway} enterprise linux ensure --from-package --config /etc/mdm/defenseclaw/config.yaml --json"
  # Retry only lifecycle_busy (75). Discard repeated JSON result documents.
  $ensure_cmd = "/bin/sh -c 'attempt=0; while :; do ${ensure_once} >/dev/null; rc=\$?; [ \$rc -eq 0 ] && exit 0; [ \$rc -ne 75 ] && exit \$rc; attempt=\$((attempt + 1)); [ \$attempt -ge 5 ] && exit 75; sleep 30; done'"

  file { '/etc/mdm':
    ensure => directory,
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
  }
  file { '/etc/mdm/defenseclaw':
    ensure => directory,
    owner  => 'root',
    group  => 'root',
    mode   => '0700',
  }
  file { '/etc/mdm/defenseclaw/config.yaml':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0600',
    content => file('profile/defenseclaw/config.yaml'),
  }
  file { '/etc/defenseclaw':
    ensure => directory,
    owner  => 'root',
    mode   => '0755',
  }
  # Written only when missing; the lifecycle owns the file after the first install.
  file { '/etc/defenseclaw/config.yaml':
    ensure  => file,
    owner   => 'root',
    mode    => '0640',
    replace => false,
    content => file('profile/defenseclaw/config.yaml'),
  }
  file { "/var/cache/${pkg}":
    ensure         => file,
    owner          => 'root',
    group          => 'root',
    mode           => '0644',
    source         => "puppet:///modules/profile/defenseclaw/${pkg}",
    checksum       => 'sha256',
    checksum_value => $sha256,
  }
  package { 'defenseclaw-enterprise':
    ensure   => latest,
    provider => $provider,
    source   => "/var/cache/${pkg}",
    require  => [File["/var/cache/${pkg}"], File['/etc/defenseclaw/config.yaml']],
  }
  # Apply a changed config or package now.
  exec { 'defenseclaw-ensure':
    command     => $ensure_cmd,
    refreshonly => true,
    subscribe   => [File['/etc/mdm/defenseclaw/config.yaml'], Package['defenseclaw-enterprise']],
    tries       => 1,
  }
  # Repair drift: run ensure only when verify fails.
  exec { 'defenseclaw-repair':
    command   => $ensure_cmd,
    unless    => "${gateway} enterprise linux verify --json",
    require   => Exec['defenseclaw-ensure'],
    tries     => 1,
  }

  $key = lookup('defenseclaw::ai_defense_key', Optional[String], 'first', undef)
  if $key {
    file { '/etc/mdm/defenseclaw/ai-defense-api-key':
      ensure    => file,
      owner     => 'root',
      group     => 'root',
      mode      => '0600',
      content   => Sensitive($key),
      show_diff => false,
    }
    exec { 'defenseclaw-secret':
      command     => "${gateway} enterprise secret set --name ai-defense-api-key --from-file /etc/mdm/defenseclaw/ai-defense-api-key --json",
      refreshonly => true,
      subscribe   => File['/etc/mdm/defenseclaw/ai-defense-api-key'],
      require     => Exec['defenseclaw-repair'],
      tries       => 5,
      try_sleep   => 30,
    }
  }
}

Notes:

  • ensure => latest with a source installs the package and upgrades it when source points at a newer file.
  • The ensure and repair commands retry only exit 75 (busy); an invalid config exits immediately.
  • The key stays in a root-only file so that Puppet can tell when it changes. To avoid that copy, run enterprise secret set from standard input in a one-off task.

Chef

This recipe uses the directory, file, cookbook_file, remote_file, dpkg_package or rpm_package, and execute resources (file, remote_file, dpkg_package, rpm_package, execute). Put config.yaml in the cookbook's files folder. Store the optional key as the encrypted node attribute defenseclaw.ai_defense_key; leave the attribute unset on nodes without AI Defense.

recipes/default.rb
version = 'X.Y.Z'
sha256 = '<sha256 of the package for this host>'
arch = node['kernel']['machine'] == 'aarch64' ? 'arm64' : 'amd64'
format = platform_family?('debian') ? 'deb' : 'rpm'
pkg = "defenseclaw-enterprise-#{version}-linux-#{arch}.#{format}"
gateway = '/opt/defenseclaw/bin/defenseclaw-gateway'
ensure_cmd = "#{gateway} enterprise linux ensure --from-package --config /etc/mdm/defenseclaw/config.yaml --json"

directory '/etc/mdm/defenseclaw' do
  owner 'root'
  group 'root'
  mode '0700'
  recursive true
end

cookbook_file '/etc/mdm/defenseclaw/config.yaml' do
  source 'config.yaml'
  owner 'root'
  group 'root'
  mode '0600'
  notifies :run, 'execute[defenseclaw-ensure]', :delayed
end

directory '/etc/defenseclaw' do
  owner 'root'
  mode '0755'
end

# Written only when missing; the lifecycle owns the file after the first install.
cookbook_file '/etc/defenseclaw/config.yaml' do
  source 'config.yaml'
  owner 'root'
  mode '0640'
  action :create_if_missing
end

remote_file "/var/cache/#{pkg}" do
  source "https://github.com/cisco-ai-defense/defenseclaw/releases/download/#{version}/#{pkg}"
  checksum sha256
  owner 'root'
  group 'root'
  mode '0644'
end

declare_resource(format == 'deb' ? :dpkg_package : :rpm_package, 'defenseclaw-enterprise') do
  source "/var/cache/#{pkg}"
  action :upgrade
  notifies :run, 'execute[defenseclaw-ensure]', :immediately
end

execute 'defenseclaw-ensure' do
  command ensure_cmd
  action :nothing
  retries 5
  retry_delay 30
end

execute 'defenseclaw-repair' do
  command ensure_cmd
  not_if "#{gateway} enterprise linux verify --json"
  retries 5
  retry_delay 30
end

key = node['defenseclaw'] && node['defenseclaw']['ai_defense_key']
if key
  file '/etc/mdm/defenseclaw/ai-defense-api-key' do
    content key
    owner 'root'
    group 'root'
    mode '0600'
    sensitive true
    notifies :run, 'execute[defenseclaw-secret]', :immediately
  end

  execute 'defenseclaw-secret' do
    command "#{gateway} enterprise secret set --name ai-defense-api-key --from-file /etc/mdm/defenseclaw/ai-defense-api-key --json"
    action :nothing
    retries 5
    retry_delay 30
  end
end

Notes:

  • action :upgrade installs the package and upgrades it when source points at a newer file.
  • retries and retry_delay retry any failure, so a busy lock (75) is retried. sensitive true keeps the key out of Chef's logs and reports.
  • remote_file checks the download against checksum, the SHA-256 pin.

Salt

This state uses file.directory, file.managed, pkg.installed and cmd.run (file, pkg, cmd, retry). Put config.yaml in salt://defenseclaw/, and the key in Pillar as defenseclaw:ai_defense_key, encrypted with your Pillar renderer.

defenseclaw/init.sls
{% set version = 'X.Y.Z' %}
{% set sha256 = '<sha256 of the package for this host>' %}
{% set arch = 'arm64' if grains['cpuarch'] == 'aarch64' else 'amd64' %}
{% set format = 'deb' if grains['os_family'] == 'Debian' else 'rpm' %}
{% set pkg = 'defenseclaw-enterprise-' ~ version ~ '-linux-' ~ arch ~ '.' ~ format %}
{% set gateway = '/opt/defenseclaw/bin/defenseclaw-gateway' %}
{% set ensure_cmd = gateway ~ ' enterprise linux ensure --from-package --config /etc/mdm/defenseclaw/config.yaml --json' %}

defenseclaw-staging:
  file.directory:
    - name: /etc/mdm/defenseclaw
    - user: root
    - group: root
    - mode: '0700'
    - makedirs: True

defenseclaw-candidate-config:
  file.managed:
    - name: /etc/mdm/defenseclaw/config.yaml
    - source: salt://defenseclaw/config.yaml
    - user: root
    - group: root
    - mode: '0600'
    - require:
      - file: defenseclaw-staging

# Written only when missing; the lifecycle owns the file after the first install.
defenseclaw-layout-config:
  file.managed:
    - name: /etc/defenseclaw/config.yaml
    - source: salt://defenseclaw/config.yaml
    - user: root
    - mode: '0640'
    - makedirs: True
    - dir_mode: '0755'
    - replace: False

defenseclaw-package-file:
  file.managed:
    - name: /var/cache/{{ pkg }}
    - source: https://github.com/cisco-ai-defense/defenseclaw/releases/download/{{ version }}/{{ pkg }}
    - source_hash: sha256={{ sha256 }}
    - user: root
    - group: root
    - mode: '0644'

# source_hash is not checked for a salt:// source: check the pin here.
defenseclaw-package-pin:
  cmd.run:
    - name: "echo '/var/cache/{{ pkg }} does not match its SHA-256 pin' >&2; exit 1"
    - unless: "echo '{{ sha256 }}  /var/cache/{{ pkg }}' | sha256sum -c --status"
    - require:
      - file: defenseclaw-package-file

defenseclaw-enterprise:
  pkg.installed:
    - sources:
      - defenseclaw-enterprise: /var/cache/{{ pkg }}
    - require:
      - file: defenseclaw-layout-config
      - cmd: defenseclaw-package-pin

defenseclaw-ensure:
  cmd.run:
    - name: {{ ensure_cmd }}
    - onchanges:
      - file: defenseclaw-candidate-config
      - pkg: defenseclaw-enterprise
    - retry:
        attempts: 5
        interval: 30
        until: True

defenseclaw-repair:
  cmd.run:
    - name: {{ ensure_cmd }}
    - unless: {{ gateway }} enterprise linux verify --json
    - require:
      - cmd: defenseclaw-ensure
    - retry:
        attempts: 5
        interval: 30
        until: True

{% if salt['pillar.get']('defenseclaw:ai_defense_key') %}
defenseclaw-key-file:
  file.managed:
    - name: /etc/mdm/defenseclaw/ai-defense-api-key
    - contents_pillar: defenseclaw:ai_defense_key
    - user: root
    - group: root
    - mode: '0600'
    - show_changes: False
    - require:
      - file: defenseclaw-staging

defenseclaw-secret:
  cmd.run:
    - name: {{ gateway }} enterprise secret set --name ai-defense-api-key --from-file /etc/mdm/defenseclaw/ai-defense-api-key --json
    - onchanges:
      - file: defenseclaw-key-file
    - require:
      - cmd: defenseclaw-repair
    - retry:
        attempts: 5
        interval: 30
        until: True
{% endif %}

Notes:

  • pkg.installed with sources reads the version from the file and installs it when it differs from the installed version.
  • file.managed checks source_hash only for http(s) and ftp sources. defenseclaw-package-pin checks the cached package against the pin whatever the source, and pkg.installed requires it, so a package that does not match is never installed.
  • show_changes: False keeps the key out of the state output.
  • retry runs a failed state again, so a busy lock (75) is retried.

Plain apt and dnf

Run this script as root, in the folder with config.yaml and the verified package. Use the install command for your distribution:

set -e
install -d -m 0700 -o root -g root /etc/mdm/defenseclaw
install -m 0600 -o root -g root config.yaml /etc/mdm/defenseclaw/config.yaml
install -d -m 0755 -o root -g root /etc/defenseclaw
[ -e /etc/defenseclaw/config.yaml ] || install -m 0640 -o root -g root config.yaml /etc/defenseclaw/config.yaml

if command -v apt-get >/dev/null; then
  apt-get install -y ./defenseclaw-enterprise-X.Y.Z-linux-amd64.deb
else
  dnf install -y ./defenseclaw-enterprise-X.Y.Z-linux-amd64.rpm
fi

rc=75
for attempt in 1 2 3 4 5; do
  /opt/defenseclaw/bin/defenseclaw-gateway enterprise linux ensure --from-package \
    --config /etc/mdm/defenseclaw/config.yaml --json && { rc=0; break; } || rc=$?
  [ "$rc" -eq 75 ] || break
  [ "$attempt" -eq 5 ] || sleep 30
done
echo "ensure exited $rc"
exit "$rc"

Store the key from an administrator session, on standard input:

read -rs KEY && printf '%s' "$KEY" | sudo /opt/defenseclaw/bin/defenseclaw-gateway enterprise secret set --name ai-defense-api-key --from-stdin --json; unset KEY

To upgrade, install the newer package the same way and run ensure again. To go back a version, see Roll back.

Payload archive instead of the package

Hosts without dpkg or rpm can use the .tar.gz payload, extracted as root into a root-only folder on a filesystem that allows execution. Without fapolicyd, run ensure with --payload and drop --from-package. With fapolicyd, follow the staged-payload trust and two-stage tarball install, adding installed-tree trust on a fresh install and updating its existing entry on an upgrade or rerun. A host installed from the package refuses a payload upgrade (package_owned_binaries): keep each host on one channel.

Check health

After the first install or a reinstall, ask users to restart agent sessions that were already open. Those sessions keep running without DefenseClaw until restarted. status and ensure report agent_sessions_restart_required while they remain open. A Codex shared background server that started before the install keeps the requirements it read; have the user run codex app-server daemon restart or start Codex with codex --no-daemon.

CheckCommand or file
Verify, read-only/opt/defenseclaw/bin/defenseclaw-gateway enterprise linux verify --json (exit 1 on a problem)
Status, read-only/opt/defenseclaw/bin/defenseclaw-gateway enterprise linux status --json
The package's own result/var/lib/defenseclaw-enterprise/last-package-result.json
Installed packagedpkg-query -W -f='${Status} ${Version}' defenseclaw-enterprise or rpm -q defenseclaw-enterprise
Kit detection scriptpackaging/mdm/linux/detect.sh --require-healthy (exit 1, or unhealthy with --format value, when verify reports a problem, coverage_complete is false, or security_complete is false for any reason other than hook_process_fail_open, unprivileged_user_namespaces and unprivileged_ptrace; a host with only those warnings passes and gets them on standard error). Add --require-security-complete to fail on incomplete security too

The deployment also runs verify daily through defenseclaw-enterprise-verify.timer (Detection, Status and verify).

Uninstall

Remove DefenseClaw from the tool's run list first, so the next run does not reinstall it. Then remove the package: its pre-remove step runs enterprise linux uninstall. Each user keeps ~/.defenseclaw and the per-user binaries; to remove those too, run the kit's packaging/mdm/linux/uninstall.sh --purge, which runs the lifecycle's uninstall with --purge and then removes the package. On Debian and Ubuntu, apt-get purge defenseclaw-enterprise also deletes what a failed uninstall left behind. What each form removes: Uninstall. Delete /etc/mdm/defenseclaw when you no longer need the staged config and key.

Exit codes

CodeMeaningWhat the recipes do
0Success, or nothing to doReport a change only when the result has "noop": false
1Failed and rolled back, or the config does not validate (config_invalid)Fail the run; read errors[].code (Lifecycle error codes)
2Invalid arguments, such as a relative --config pathFail the run; fix the command
75Another lifecycle run holds the lockRetry after a delay