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] [-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 |
--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:¶
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” |
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]
-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
command | the command to execute |
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]
-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]
-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
name | The name of the module |
freeze¶
Set all version numbers in project.yml
inmanta modules freeze [-h] [-o OUTFILE] [-r] [--operator OPERATOR]
-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]
-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] [-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” |
export¶
Export the configuration
inmanta export [-h] [-g] [-j JSON] [-e ENVIRONMENT] [-d] [-m]
[--server_address SERVER] [--server_port PORT] [--token TOKEN]
[--ssl] [--ssl-ca-cert CA_CERT] [-X] [-f MAIN_FILE]
[--metadata METADATA] [--model-export]
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 |
-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 |
inmanta-cli¶
Use inmanta-cli --help