How Changes Are Applied or Discarded
When fields and entities are changed, the changes are not immediately applied to the system configuration but remain in a staged status. Items that are staged are indicated by an ‘*' (asterisk) when the ‘show
’ command is used. In addition, the 'changes
’ command can be used to show what fields have been changed.
In the following example, the user ‘john’ has been changed to alter the description. The ‘show ’ command indicates the changed field with an '*'. The changes command lists the changed field.
config(user john): description "Admin"
config(user john): show
Entity user item john
description Admin * enabled true
no_password false password false
password
ssh_password_enabled true
groups (array)
Applying or Discarding Changes
When fields and entities have been changed, they are not yet applied to the system configuration but are kept staged. Items that are staged are indicated with an ‘*' when the ‘show’ command is used. In addition, the 'changes’ command can be used to show what fields have been changed.
When any changes have been made to a single or multiple entities, the following commands become available. These commands are described in detail in the Config CLI Commands section:
Command | Description |
---|---|
changes | Show staged changes on all entities. |
apply | Apply changes only on the current entity. |
discard | Discard changes only on the current entity. |
apply all | Apply changes on all entities. |
discard all | Discard changes on all entities. |
Example
In the following example, the user ‘john’ has been changed to alter the description. The ‘show’ command indicates the changed field with an asterisk '*'. The changes command lists the changed field.
config(user john): description "Scrum Master"
config(user john): show
Entity user item john
description Scrum Master *
enabled true
no_password false
password
ssh_password_enabled true
groups (array)
config(user john): changes
Entity user item john (edit)
description Scrum Master
config(user john):