Code Monkey home page Code Monkey logo

ansible-generator's Introduction

ansible-generator

Generate documentation and continuous integration files for an Ansible Role.

The intention is to focus on writing or maintaining the Ansible role, and use this tool to generate chore-like-tasks.

Overview

+--- role ----------------------+                     +--- role -------------------------------+
| meta/main.yml                 |                     | README.md                              |
| molecule/default/converge.yml |                     | bug_report.md                          |
| meta/preferences.yml          |                     | feature_requests.md                    |
| requirements.yml              |                     | FUNDING.md                             |
| molecule/default/prepare.yml  |                     | .gitignore                             |
| molecule/default/verify.yml   |                     | .pre-commit.config.yaml                |
| defaults/main.yml             |                     | .yamllint                              |
+------------------------+------+                     | .ansible-lint                          |
                         |                            | CONTRIBUTING.md                        |
+--- this tool -----+    |                            | .github/workflows/galaxy.yml           |
| defaults/main.yml | ---+                            | .gitlab-ci.yml                         |
| vars/main.yml     |    |                            | LICENSE                                |
| files/*           |    |                            | .github/workflows/molecule.yml         |
| templates/*       |    |                            | molecule/default/molecule.yml          |
+-------------------+    |    +--- this tool ---+     | .github/workflows/requirements2png.yml |
                         +--> | generate.yml    | --> | SECURITY.md                            |
                              +-----------------+     | settings.yml                           |
                                                      | .github/workflows/todo.yml             |
                                                      | .tox.ini                               |
                                                      +----------------------------------------+

Usage

cd ansible-role-my_role
../path/to/generate.yml

Configuration

In defaults/main.yml you can change these variable to customize the output.

Settings to Docker containers

  • docker_namespace
  • docker_image
  • docker_tag

Your username on Galaxy

  • galaxy_namespace

Your username/organization name on GitHub

  • github_namespace

Your username/group on GitLab

  • gitlab_namespace

Your name and optionally email-address

  • author

The full URL to your website

  • author_website

meta/preferences.yml

This (optional) file describes how Tox and Molecule should behave.

parameter type default description
tox_ansible_versions list of strings [5,6,7] What versions should Tox test? (Default: all.)
github_variables_mapping list not set A list of name and variable, name refers to the GitHub exposed name, variable refers to the name you'd like to pass to molecule, tox and Ansible.

Example

---
tox_ansible_versions:
  - 6
  - 7

github_variables_mapping:
  - name: secrets.VAULT_LICENSE
    variable: VAULT_LICENCE
  - name: secrets.MY_VAR
    variable: someTHING

ansible-generator's People

Contributors

gotmax23 avatar robert-de-bock avatar robertdebock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-generator's Issues

Feature Request: Switch to Copier for generating Ansible Role

Description

I'd like to suggest switching to Copier for generating documentation and continuous integration (CI) files for the Ansible roles managed by ansible-generator. Copier is an open-source tool that simplifies the process of generating projects and files from templates. It provides a simple syntax for describing the files to generate and the variables to use for customizing the generation process.

Benefits

Here are some benefits of using Copier that I think would be particularly useful for ansible-generator:

  • Simpler, more maintainable templates: Copier uses a straightforward syntax that makes it easy to describe the files to generate and the variables to use. This would make it easier for maintainers to update the templates as needed and for users to customize the generated files.
  • More flexibility: Copier provides a lot of flexibility in how it generates files. It can generate files from local templates or remote repositories, and it can even use Jinja2 templates to generate files dynamically based on the user's input. This would give users more options for how they generate their files.
  • More powerful templates: Copier provides a lot of built-in functions for working with files, directories, strings, and other data types. This would enable more powerful templates that could do things like generating files based on the current date or iterating over a list of items to generate multiple files.

Additional Information

Thank you for considering this suggestion! Please let me know if you have any questions or concerns.

Feature request: Support for Ansible Collections

Currently, ansible-generator supports generating documentation and continuous integration files for Ansible Roles only. However, with the introduction of Ansible Collections, there is a need to support collections as well.

As Ansible has moved towards using collections as the preferred way of packaging and distributing content, it would be great if ansible-generator could also generate documentation and CI files for collections.

Given the growing adoption of collections, it is important that ansible-generator keeps up with the changes and supports collections as well. I believe it's time to shift our focus towards collections and encourage users to adopt them as well.

Could you please consider adding support for Ansible Collections in ansible-generator?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.