Command Reference

All inmanta commands and services are started by the inmanta command. This page provides an overview of all subcommands available:

inmanta

usage: inmanta [-h] [-p] [-c CONFIG_FILE] [--log-file LOG_FILE]
               [--log-file-level LOG_FILE_LEVEL] [--timed-logs] [-v]
               {deploy,compile,server,export,list-commands,agent,modules} ...

Named Arguments

-p

Profile this run of the program

Default: False

-c, --config Use this config file
--log-file Path to the logfile
--log-file-level
 

Log level for messages going to the logfile: 0=ERROR, 1=WARNING, 2=INFO, 3=DEBUG

Default: 2

--timed-logs

Add timestamps to logs

Default: False

-v, --verbose

Log level for messages going to the console. Default is only errors,-v warning, -vv info and -vvv debug and -vvvv trace

Default: 0

Sub-commands:

deploy

Deploy with a inmanta all-in-one setup

inmanta deploy [-h] [-p PROJECT] [-a AGENT] [-m MAP] [--dry-run] [-l]
               [--no-agent-log] [-f MAIN_FILE]
Named Arguments
-p The project name
-a Deploy the resources of this agent. Multiple agents are comma separated and wildcards are supported
-m

Agent mapping in the format: agentname=mappedname,agentname2=other

Default: “”

--dry-run

Only report changes

Default: False

-l

List the deployment agents in the model

Default: False

--no-agent-log

Do not capture agents logs, print them to stdout

Default: False

-f

Main file

Default: “main.cf”

compile

Compile the project to a configuration model

inmanta compile [-h] [-e ENVIRONMENT] [-X] [--server_address SERVER]
                [--server_port PORT] [--username USER] [--password PASSWORD]
                [--ssl] [--ssl-ca-cert CA_CERT] [-f MAIN_FILE]
Named Arguments
-e The environment to compile this model for
-X, --extended-errors
 

Show stack traces for compile errors

Default: False

--server_address
 The address of the server hosting the environment
--server_port The port of the server hosting the environment
--username The username of the server
--password The password of the server
--ssl

Enable SSL

Default: False

--ssl-ca-cert Certificate authority for SSL
-f

Main file

Default: “main.cf”

server

Start the inmanta server

inmanta server [-h]

export

Export the configuration

inmanta export [-h] [-g] [-j JSON] [-e ENVIRONMENT] [-d]
               [--server_address SERVER] [--server_port PORT] [--token TOKEN]
               [--ssl] [--ssl-ca-cert CA_CERT] [-X] [-f MAIN_FILE]
               [--metadata METADATA]
Named Arguments
-g

Dump the dependency graph

Default: False

-j Do not submit to the server but only store the json that would have been submitted in the supplied file
-e The environment to compile this model for
-d

Trigger a deploy for the exported version

Default: False

--server_address
 The address of the server to submit the model to
--server_port The port of the server to submit the model to
--token The token to auth to the server
--ssl

Enable SSL

Default: False

--ssl-ca-cert Certificate authority for SSL
-X, --extended-errors
 

Show stack traces for compile errors

Default: False

-f

Main file

Default: “main.cf”

--metadata JSON metadata why this compile happened. If a non-json string is passed it is used as the ‘message’ attribute in the metadata.

list-commands

Print out an overview of all commands

inmanta list-commands [-h]

agent

Start the inmanta agent

inmanta agent [-h]

modules

Subcommand to manage modules

inmanta modules [-h]
                {list,do,update,install,status,push,verify,validate,commit,create}
                ...
subcommand
cmd Possible choices: list, do, update, install, status, push, verify, validate, commit, create
Sub-commands:
list

List all modules used in this project in a table

inmanta modules list [-h] [-r]
Named Arguments
-r

Output a list of requires that can be included in project.yml

Default: False

do

Execute a command on all loaded modules

inmanta modules do [-h] command
Positional Arguments
command the command to execute
update

Update all modules used in this project

inmanta modules update [-h]
install

Install all modules required for this this project

inmanta modules install [-h]
status

Run a git status on all modules and report

inmanta modules status [-h]
push

Run a git push on all modules and report

inmanta modules push [-h]
verify

Verify dependencies and frozen module versions

inmanta modules verify [-h]
validate

Validate the module we are currently in. i.e. try to compile it against an empty main model

inmanta modules validate [-h] [-r REPO] [-n] [-s] [-i] [-w]
Named Arguments
-r, --repo Additional repo to load modules from
-n, --no-clean

Do not remove the validation project when finished

Default: False

-s, --parse-only
 

Only parse the module

Default: False

-i, --isolate

Move the module to another directory before cloning. I.e. remove all other modules in the current directory from the search path

Default: False

-w, --workingcopy
 

Use the actual state of the module instead of the latest tag

Default: False

commit

Commit all changes in the current module.

inmanta modules commit [-h] -m MESSAGE [-r] [--major] [--minor] [--patch]
                       [-v VERSION] [-a]
Named Arguments
-m, --message Commit message
-r, --release

make a release

Default: True

--major

make a major release

Default: False

--minor

make a major release

Default: False

--patch

make a major release

Default: False

-v, --version Version to use on tag
-a, --all

Use commit -a

Default: False

create

Create a new module

inmanta modules create [-h] name
Positional Arguments
name The name of the module

inmanta-cli

Use inmanta-cli --help