> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/user-docs/deployment/actions.md).

# Actions

## Actions

Actions define what the deployment will achieve. For example:

* Executing a script is an action.
* Storing a file on the agent's filesystem is also an action.

Actions within a package can be **ordered**, giving you control over the sequence in which they are executed. This enables you to customize the package execution process to suit your specific requirements, ensuring that dependent actions are performed in the correct order.

### Adding Actions

{% stepper %}
{% step %}
Access the **Actions** page.

Click the **gear icon** in the **Actions** column of the packages table.

This will take you to a secondary page displaying all existing actions for the selected package.
{% endstep %}

{% step %}
Click the **Add action** button.

A form will appear for adding a new action.
{% endstep %}

{% step %}
Fill out the form.

* **Name**: Provide a  name for the action.
* **Action** **type**:&#x20;
  * Execute a command
  * Execute a file/script
  * Save file/compressed folder
* **Command**: Specify the command or file path associated with the action.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FrFxJ79i186cR2KcokoMG%2Fimage_2026-04-23_115940183.png?alt=media&amp;token=78de250a-788f-4f59-9721-b3875f1935fa" alt="Deployment action creation form" width="519"><figcaption><p>Deployment action creation form</p></figcaption></figure>
{% endstep %}

{% step %}
Click **Add**.
{% endstep %}
{% endstepper %}

### Edit an Action

{% stepper %}
{% step %}
Access the **Actions** Page.

Click the **gear icon** in the **Actions** column of the Packages table.

This will take you to a secondary page displaying all existing actions for the selected package.
{% endstep %}

{% step %}
Click the **pencil icon**.

In the **Actions** column of the Actions table, locate the action you want to edit and click the **pencil icon**.

A form will appear, displaying the current configuration of the action.
{% endstep %}

{% step %}
Update the **Action**.

Modify the fields as needed:

* **Name**: update the action's name.
* **Action type**: adjust the type of action.
* **Command**: edit the command or file path associated with the action.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FEmCJnS9F5i4Im4BGJr1b%2Fimage.png?alt=media&amp;token=c45a7df2-596e-4134-9cd9-695660b1eb2e" alt="Editing an Action"><figcaption><p>Editing an Action</p></figcaption></figure>
{% endstep %}

{% step %}
Click **Save**.
{% endstep %}
{% endstepper %}

### Reordering Actions

To change the execution order of actions within a package:

{% stepper %}
{% step %}
Access the Actions page.

Click the **gear icon** in the **Actions** column of the Packages table.

This will take you to a secondary page displaying all existing actions for the selected package.
{% endstep %}

{% step %}
Locate the **handle.**

Find the **drag-and-drop handle** on the left side of the Actions table for each entry.
{% endstep %}

{% step %}
Reposition the Action.

Drag the handle to move the action to your desired position, placing it above or below other actions.

The table will automatically update to reflect the new order.
{% endstep %}
{% endstepper %}

### Remove an Action

To delete an existing action from a package:

{% stepper %}
{% step %}
Access the Actions page.

Click the **gear icon** in the **Actions** column of the Packages table.

This will take you to a secondary page displaying all existing actions for the selected package.
{% endstep %}

{% step %}
Locate the Action.

Find the action you want to delete in the Actions table.
{% endstep %}

{% step %}
Delete the Action.

Click the **trash icon** in the Actions column for the selected action.

Confirm the deletion when prompted.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.ocsinventory-ng.org/user-docs/deployment/actions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
