A CLI tool for scaffolding Ansible Content.
Project description
ansible-creator
A CLI tool for scaffolding all your Ansible Content.
Installation
$ pip install 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.
optional arguments:
-h, --help show this help message and exit
--version Print ansible-creator version and exit.
Commands:
{init} The subcommand to invoke.
init Initialize an Ansible Collection.
Initialize an Ansible Collection skeleton with 'init'
$ ansible-creator init --help
usage: ansible-creator init [-h] [--na] [--lf LOG_FILE] [--ll {notset,debug,info,warning,error,critical}] [--la {true,false}] [--json] [-v]
[--init-path INIT_PATH] [--force]
collection
Creates the skeleton framework of an Ansible collection.
positional arguments:
collection The collection name in the format ``<namespace>.<collection>``.
optional arguments:
-h, --help show this help message and exit
--na, --no-ansi Disable the use of ANSI codes for terminal color.
--lf LOG_FILE, --log-file <file> LOG_FILE
Log file to write to.
--ll {notset,debug,info,warning,error,critical}, --log-level <level> {notset,debug,info,warning,error,critical}
Log level for file output.
--la {true,false}, --log-append <bool> {true,false}
Append to log file.
--json Output messages as JSON
-v, --verbose Give more Cli output. Option is additive, and can be used up to 3 times.
--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 testns.testname --init-path $HOME/collections/ansible_collections
Note: collection testns.testname created at /home/ansible-dev/collections/ansible_collections
Running the above command generates an Ansible Collection with the following structure:
$ tree -lla /home/ansible-dev/collections/ansible_collections
.
├── CHANGELOG.rst
├── changelogs
│ └── config.yaml
├── docs
│ └── docsite
│ └── links.yml
├── extensions
│ ├── eda
│ │ └── rulebooks
│ │ └── rulebook.yml
│ └── molecule
│ ├── integration_hello_world
│ │ └── molecule.yml
│ └── utils
│ ├── playbooks
│ │ ├── converge.yml
│ │ └── noop.yml
│ └── vars
│ └── vars.yml
├── galaxy.yml
├── LICENSE
├── meta
│ └── runtime.yml
├── plugins
│ ├── action
│ │ └── __init__.py
│ ├── cache
│ │ └── __init__.py
│ ├── filter
│ │ ├── hello_world.py
│ │ └── __init__.py
│ ├── inventory
│ │ └── __init__.py
│ ├── modules
│ │ └── __init__.py
│ ├── module_utils
│ │ └── __init__.py
│ ├── plugin_utils
│ │ └── __init__.py
│ ├── sub_plugins
│ │ └── __init__.py
│ └── test
│ └── __init__.py
├── pyproject.toml
├── README.md
└── tests
├── integration
│ ├── __init__.py
│ ├── targets
│ │ └── hello_world
│ │ └── tasks
│ │ └── main.yml
│ └── test_integration.py
└── unit
Upcoming features
- Scaffold Ansible plugins of your choice with the
create
action. Switch to the create branch and try it out!
Licensing
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ansible-creator-0.0.1a2.tar.gz
(46.3 kB
view details)
Built Distribution
File details
Details for the file ansible-creator-0.0.1a2.tar.gz
.
File metadata
- Download URL: ansible-creator-0.0.1a2.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 398e0b611178db076d88850444debc400ecfb7ad22384a5927fece49e2c9f7b3 |
|
MD5 | e0eddf97c8d58c52ec3b66384e0d1ef0 |
|
BLAKE2b-256 | edac0b2bf422e56c133d0c31ee5a9de0c4beef71c9dbbeeec1401bae36edce14 |
File details
Details for the file ansible_creator-0.0.1a2-py3-none-any.whl
.
File metadata
- Download URL: ansible_creator-0.0.1a2-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3068f6fc9f1a3bf92ea02fd52f0b09575b52c578ecc7d69f7ee85c8b13fe682b |
|
MD5 | 1dc7b7a1e6aae5c1924d11a5a0482113 |
|
BLAKE2b-256 | ec40ff5063269dce62de7efdce20cf28e10a11dcc9ffc241dd1da7de33504e8e |