-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from NilashishC/updates_1
Updates to README and init structure
- Loading branch information
Showing
18 changed files
with
931 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# ansible-creator | ||
|
||
A CLI tool for scaffolding Ansible Content. | ||
|
||
## Installation | ||
|
||
``` | ||
$ pip install git+https://github.com/NilashishC/ansible-creator | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
$ ansible-creator --help | ||
usage: ansible-creator [-h] [--version] {init} ... | ||
Tool to scaffold Ansible Content. Get started by looking at the help text. | ||
positional arguments: | ||
{init} The command to invoke. | ||
init Initialize an Ansible Collection. | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
--version Print ansible-creator version and exit. | ||
``` | ||
|
||
### Initialize an Ansible Collection skeleton with 'init' | ||
|
||
``` | ||
$ ansible-creator init --help | ||
usage: ansible-creator init [-h] [--verbose] [--init-path INIT_PATH] [--force] collection_name | ||
Creates the skeleton framework of an Ansible collection. | ||
positional arguments: | ||
collection_name The collection name in the format ``<namespace>.<collection>``. | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
--verbose Increase output verbosity | ||
--init-path INIT_PATH | ||
The path in which the skeleton collection will be created. | ||
The default is the current working directory. | ||
--force Force re-initialize the specified directory as an Ansible collection. | ||
``` | ||
|
||
``` | ||
$ ansible-creator init namespace.name --init-path $HOME | ||
INFO starting requested action 'init' | ||
INFO collection namespace.name successfully created at /home/ansible | ||
``` | ||
|
||
Running the above command generates an Ansible Collection with the following structure: | ||
|
||
``` | ||
$ tree -lla /home/ansible/namespace/name | ||
/home/ansible/namespace/name | ||
├── CHANGELOG.rst | ||
├── changelogs | ||
│ └── config.yaml | ||
├── docs | ||
│ ├── docsite | ||
│ │ └── links.yml | ||
│ └── .keep | ||
├── galaxy.yml | ||
├── .github | ||
│ └── workflows | ||
│ └── test.yml | ||
├── .isort.cfg | ||
├── LICENSE | ||
├── meta | ||
│ └── runtime.yml | ||
├── plugins | ||
│ ├── action | ||
│ │ └── __init__.py | ||
│ ├── cache | ||
│ │ └── __init__.py | ||
│ ├── filter | ||
│ │ └── __init__.py | ||
│ ├── inventory | ||
│ │ └── __init__.py | ||
│ ├── modules | ||
│ │ └── __init__.py | ||
│ ├── module_utils | ||
│ │ └── __init__.py | ||
│ ├── plugin_utils | ||
│ │ └── __init__.py | ||
│ ├── sub_plugins | ||
│ │ └── __init__.py | ||
│ └── test | ||
│ └── __init__.py | ||
├── .pre-commit-config.yaml | ||
├── .prettierignore | ||
├── pyproject.toml | ||
├── README.md | ||
├── tests | ||
│ ├── .gitignore | ||
│ ├── integration | ||
│ │ └── targets | ||
│ │ └── .keep | ||
│ └── unit | ||
│ └── .keep | ||
└── .vscode | ||
└── extensions.json | ||
``` | ||
|
||
### Upcoming features | ||
|
||
- Scaffold Ansible plugins of your choice with the `create` action. | ||
Switch to the [create](https://github.com/NilashishC/ansible-creator/tree/create) branch and try it out! | ||
|
||
## Licensing | ||
|
||
GNU General Public License v3.0 or later. | ||
|
||
See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/ansible_creator/resources/new_collection/.vscode/extensions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["redhat.ansible"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This should be updated by antsibull-changelog. Do not edit this manually! | ||
|
||
See https://github.com/ansible-community/antsibull-changelog/blob/main/docs/changelogs.rst for | ||
information on how to use antsibull-changelog. | ||
|
||
Check out ``changelogs/config.yaml`` for its configuration. You need to change at least the ``title`` field in there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/ansible_creator/resources/new_collection/changelogs/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
changelog_filename_template: ../CHANGELOG.rst | ||
changelog_filename_version_depth: 0 | ||
changes_file: changelog.yaml | ||
changes_format: combined | ||
keep_fragments: false | ||
mention_ancestor: true | ||
new_plugins_after_name: removed_features | ||
notesdir: fragments | ||
prelude_section_name: release_summary | ||
prelude_section_title: Release Summary | ||
flatmap: true | ||
sections: | ||
- - major_changes | ||
- Major Changes | ||
- - minor_changes | ||
- Minor Changes | ||
- - breaking_changes | ||
- Breaking Changes / Porting Guide | ||
- - deprecated_features | ||
- Deprecated Features | ||
- - removed_features | ||
- Removed Features (previously deprecated) | ||
- - security_fixes | ||
- Security Fixes | ||
- - bugfixes | ||
- Bugfixes | ||
- - known_issues | ||
- Known Issues | ||
- - doc_changes | ||
- Documentation Changes | ||
title: "{{ namespace|capitalize }} {{ collection_name|capitalize }} Collection" | ||
trivial_section_name: trivial |
Empty file.
47 changes: 47 additions & 0 deletions
47
src/ansible_creator/resources/new_collection/docs/docsite/links.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
# This will make sure that plugin and module documentation gets Edit on GitHub links | ||
# that allow users to directly create a PR for this plugin or module in GitHub's UI. | ||
# Remove this section if the collection repository is not on GitHub, or if you do not | ||
# want this functionality for your collection. | ||
edit_on_github: | ||
# TO-DO: Update this if your collection lives in a different GitHub organization. | ||
repository: ansible-collections/{{ namespace }}.{{ collection_name }} | ||
branch: main | ||
# If your collection root (the directory containing galaxy.yml) does not coincide with your | ||
# repository's root, you have to specify the path to the collection root here. For example, | ||
# if the collection root is in a subdirectory ansible_collections/community/REPO_NAME | ||
# in your repository, you have to set path_prefix to 'ansible_collections/community/REPO_NAME'. | ||
path_prefix: "" | ||
|
||
# Here you can add arbitrary extra links. Please keep the number of links down to a | ||
# minimum! Also please keep the description short, since this will be the text put on | ||
# a button. | ||
# | ||
# Also note that some links are automatically added from information in galaxy.yml. | ||
# The following are automatically added: | ||
# 1. A link to the issue tracker (if `issues` is specified); | ||
# 2. A link to the homepage (if `homepage` is specified and does not equal the | ||
# `documentation` or `repository` link); | ||
# 3. A link to the collection's repository (if `repository` is specified). | ||
|
||
extra_links: | ||
- description: Report an issue | ||
# TO-DO: Update this if your collection lives in a different GitHub organization. | ||
url: https://github.com/ansible-collections/{{ namespace }}.{{ collection_name }}/issues/new/choose | ||
|
||
# Specify communication channels for your collection. We suggest to not specify more | ||
# than one place for communication per communication tool to avoid confusion. | ||
communication: | ||
matrix_rooms: | ||
- topic: General usage and support questions | ||
room: "#users:ansible.im" | ||
irc_channels: | ||
- topic: General usage and support questions | ||
network: Libera | ||
channel: "#ansible" | ||
mailing_lists: | ||
- topic: Ansible Project List | ||
url: https://groups.google.com/g/ansible-project | ||
# You can also add a `subscribe` field with an URI that allows to subscribe | ||
# to the mailing list. For lists on https://groups.google.com/ a subscribe link is | ||
# automatically generated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/ansible_creator/resources/new_collection/meta/runtime.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
requires_ansible: ">=2.13.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
output/ |
Empty file.
6 changes: 6 additions & 0 deletions
6
src/ansible_creator/resources/new_collection/tests/unit/.keep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Will be updated by antsibull-changelog. Do not edit this manually! | ||
|
||
See https://github.com/ansible-community/antsibull-changelog/blob/main/docs/changelogs.rst for information | ||
on how to use antsibull-changelog. | ||
|
||
Check out changelogs/config.yaml for its configuration. You need to change at least the title field in there. |