Skip to content

Different Ansible blueprints for ansible-galaxy role init --role-skeleton "./ansible-skeletons/role_default" "name_of_your_role"

Notifications You must be signed in to change notification settings

foundata/ansible-skeletons

Repository files navigation

Ansible (Galaxy) Skeletons

This repository contains different skeletons / blueprints to kickstart the creation of new roles and collections.

They follow several guidelines and best practices:

Table of contents

Usage

  1. Clone this repository:
    git clone https://github.com/foundata/ansible-skeletons.git
  2. Call ansible-galaxy and provide the path to the skeleton to use as well as a role name:
    ansible-galaxy role init --role-skeleton "./ansible-skeletons/role_default" "name_of_your_role"
    • name_of_your_role has to follow some rules and should consist of a-z, 0-9 and _ only.
    • Adapt the --role-skeleton parameter value if you want to use another skeleton than role_default. You can find a description of the available ones below.
  3. Have a look at the created ./name_of_your_role/FIXME.md to get further instructions.

Description of provided skeletons

The following lists gives an overview over the available skeletons. You can also have a look into the sub-directories of this repository to look at their code (even though the source might be partially hard to read. There is Jinja code which will be processed by ansible-galaxy role init to get the final files).

role_default

A general purpose skeleton to create new Ansible Galaxy roles. Main features:

  • Init tasks to check the execution environment (e.g. minimum Ansible version and supported operating systems), based on the role's meta data.
  • Easy management of role parameters and belonging assert rules for validation (see {{ role_name }}_required_vars in role_default/vars/main.yml.j2 for more information).
  • Separation of logical task groups.

Compatibility

The skeletons should be compatible with ansible-galaxy from ansible-core version 2.9 and newer. It was tested with:

  • ansible-galaxy [core 2.14.8]
  • ansible-galaxy [core 2.9.13]

Contributing

See CONTRIBUTING.md if you want to get involved.

This project's functionality is mature, so there might be little activity on the repository in the future. Don't get fooled by this, the project is under active maintenance and used on daily basis by the maintainers.

Licensing, copyright

Copyright (c) 2020, 2023-2025 foundata GmbH (https://foundata.com)

This project is licensed under the GNU General Public License v3.0 or later (SPDX-License-Identifier: GPL-3.0-or-later), see LICENSES/GPL-3.0-or-later.txt for the full text.

The REUSE.toml file provides detailed licensing and copyright information in a human- and machine-readable format. This includes parts that may be subject to different licensing or usage terms, such as third-party components. The repository conforms to the REUSE specification. You can use reuse spdx to create a SPDX software bill of materials (SBOM).

REUSE status

Author information

This project was created and is maintained by the following foundata employees (alphabetical order):

If you like it, you might buy us a coffee.

About

Different Ansible blueprints for ansible-galaxy role init --role-skeleton "./ansible-skeletons/role_default" "name_of_your_role"

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published