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] [--config-dir CONFIG_DIR]
               [--log-file LOG_FILE] [--log-file-level LOG_FILE_LEVEL]
               [--timed-logs] [-v] [-X]
               {server,agent,compile,list-commands,help,modules,module,project,deploy,export}
               ...

Named Arguments

-p

Profile this run of the program

Default: False

-c, --config

Use this config file

Default: “/etc/inmanta/inmanta.cfg”

--config-dir

The directory containing the Inmanta configuration files

Default: “/etc/inmanta/inmanta.d”

--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

-X, --extended-errors

Show stack traces for errors

Default: False

Sub-commands:

server

Start the inmanta server

inmanta server [-h]

agent

Start the inmanta agent

inmanta agent [-h]

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”

list-commands

Print out an overview of all commands

inmanta list-commands [-h]

help

show a help message and exit

inmanta help [-h] [subcommand]
Positional Arguments
subcommand

Output help for a particular subcommand

modules (module)

Subcommand to manage modules

inmanta modules [-h] [-m [MODULE]]
                {list,do,update,install,status,push,verify,validate,commit,create,freeze}
                ...
Named Arguments
-m, --module

Module to apply this command to

subcommand
cmd

Possible choices: list, do, update, install, status, push, verify, validate, commit, create, freeze

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

freeze

Set all version numbers in project.yml

inmanta modules freeze [-h] [-o OUTFILE] [-r] [--operator OPERATOR]
Named Arguments
-o, --outfile

File in which to put the new project.yml, default is the existing project.yml

-r, --recursive

Freeze dependencies recursively. If not set, freeze_recursive option in project.yml is used,which defaults to False

--operator

Comparison operator used to freeze versions, If not set, the freeze_operator option in project.yml is used which defaults to ~=

project

Subcommand to manage the project

inmanta project [-h] {freeze} ...
subcommand
cmd

Possible choices: freeze

Sub-commands:
freeze

Set all version numbers in project.yml

inmanta project freeze [-h] [-o OUTFILE] [-r] [--operator OPERATOR]
Named Arguments
-o, --outfile

File in which to put the new project.yml, default is the existing project.yml

-r, --recursive

Freeze dependencies recursively. If not set, freeze_recursive option in project.yml is used,which defaults to False

--operator

Comparison operator used to freeze versions, If not set, the freeze_operator option in project.yml is used which defaults to ~=

deploy

Deploy with a inmanta all-in-one setup

inmanta deploy [-h] [--dry-run] [-f MAIN_FILE] [--dashboard]
Named Arguments
--dry-run

Only report changes

Default: False

-f

Main file

Default: “main.cf”

--dashboard

Start the dashboard and keep the server running. The server uses the current project as the source for server recompiles

Default: False

export

Export the configuration

inmanta export [-h] [-g] [-j JSON] [-e ENVIRONMENT] [-d] [--full] [-m]
               [--server_address SERVER] [--server_port PORT] [--token TOKEN]
               [--ssl] [--ssl-ca-cert CA_CERT] [-X] [-f MAIN_FILE]
               [--metadata METADATA] [--model-export]
               [--export-plugin EXPORT_PLUGIN]
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

--full

Make the agents execute a full deploy instead of an incremental deploy. Should be used together with the -d option

Default: False

-m

Also export the complete model

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.

--model-export

Export the configuration model to the server as metadata.

Default: False

--export-plugin

Only use this export plugin. This option also disables the execution of the plugins listed in the configuration file in the export setting.

inmanta-cli

Use inmanta-cli --help