Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upstream doc with add subcommand details in installing.md #317

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,69 @@ It also comes equipped with Github Action Workflows that use [ansible-content-ac
- [Using the release workflow](https://ansible.readthedocs.io/projects/dev-tools/user-guide/content-release/)

Please ensure that you review any potential `TO-DO` items in the scaffolded content and make the necessary modifications according to your requirements.

### Add support to existing project

The `add` subcommand allows users to scaffold content types like resources and plugins into an existing project. This feature is designed to streamline the development environment setup by automatically generating the necessary configuration files.

### General Usage

Get an overview of available commands and options by running:

```console
$ ansible-creator add --help
```

#### Positional Arguments

| Parameter | Description |
| ------------ | --------------------------------------------- |
| content-type | Specifies the type of content to add. |
| resource | Add resources to an existing Ansible project. |
| plugin | Add a plugin to an Ansible collection. |

#### Optional Arguments

| Short flag | Long flag | Flag argument | Description |
| ---------- | --------- | ------------- | -------------------------------- |
| -h | --help | | Show this help message and exit. |

### Add support to scaffold resource in an existing project

The `add resource` command enables you to add a resource to an already existing project. Use the following command template:

```console
$ ansible-creator add resource <resource-type> <path>
```

#### Positional Arguments

| Parameter | Description |
| ------------- | ------------------------------------------------------ |
| resource-type | Specifies the type of resource to add to the project. |
| devcontainer | Add devcontainer files to an existing Ansible project. |
| devfile | Add a devfile file to an existing Ansible project. |
| role | Add a role to an existing Ansible collection. |

### Add support to scaffold resource in an existing project

The `add resource devfile` command enables you to add a devfile resource type to an already existing project. Use the following command template:

```console
$ ansible-creator add resource devfile <path>
```

#### Positional Arguments

| Parameter | Description |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| devfile | Add a devfile file to an existing Ansible project. |
| path | The destination directory for the devfile file. The default is the current working directory. (default: `./`) |

#### Example

```console
$ ansible-creator add resource devfile /home/user/..path/to/your/existing_project
```

This command will scaffold the devfile.yaml file at `/home/user/..path/to/your/existing_project`