Quick reference for cfengine COMMANDS
For the full command list, run cfengine help or cfengine COMMAND --help.
# Save one or more hosts under a group name, for reuse in other commands
cfengine save --hosts 192.168.56.90 --role hub --name myhub
# List all saved host-groups
cfengine show
# Show details about a specific saved host (or group)
cfengine show --host myhub
# Open an interactive SSH session to a saved host
cfengine connect --hosts myhubThese are thin wrappers around the equivalent cfbs subcommands, usable from anywhere inside a cfbs project.
# Search the build-index for a module
cfengine search promise-type-git
# Add module(s) to the current cfbs project
cfengine add promise-type-git
# Set/update input.json for a module that takes input
cfengine input promise-type-git
# Remove module(s) from the current cfbs project
cfengine remove promise-type-git
# Update the current cfbs project (or specific modules)
cfengine update
cfengine update promise-type-git
# Show status of the current cfbs project
cfengine moduleinfo
# Show info about specific module(s) (does not require being inside a project)
cfengine moduleinfo promise-type-git# Build the policy set from a cfbs project (equivalent to `cfbs build`)
cfengine build
# build -> deploy -> run on the given hub without extra prompts
cfengine build --hub myhub --non-interactive
# Deploy an already-built policy set to a hub
cfengine deploy --hub myhub# Default: cf-agent -KIf update.cf && cf-agent -KIf
# If there is a local installation, this will be used
cfengine run
# Run a specific policy file (resolved locally, or uploaded if not found remotely)
cfengine run /tmp/some_policy.cf
# Run against a specific saved host, instead of being prompted
cfengine run --host myhub
# Chain multiple commands, executed in sequence
cfengine run /tmp/some_policy.cf /tmp/other_policy.cf# Build project on top of the default masterfiles (default, same as `cfbs init`)
cfengine init --policy-set
# Initialize an example build project for working on a custom promise type (python)
cfengine init --promise-type
# Initialize an exapmlte module project for build.cfengine.com (or internal use)
cfengine init --policy-module
# Initialize an example policy module that takes input data
cfengine init --policy-module --with-input
# Skip interactive prompts
cfengine init --promise-module --non-interactivecfengine format
cfengine lint
cfengine lint main.cf# Refresh reporting data on all known hubs/clients (capped at 25 hosts), optional flag to run agent first.
cfengine report [--run-agent]
# Only refresh a specific hub (and its clients, capped at 25), running the agent first
cfengine report --hub myhub --run-agentSee README.md for installation and general usage, and HACKING.md for contributing/development info.