This collection provides a set of modules, plugins and playbooks designed to streamline ansible role development and maintenance.
Your need to install the collection from github, as my galaxy account is broken:
ansible-galaxy collection install git+https://github.com/jomrr/ansible-collection-dev.git,main
The following examples demonstrate how to use modules and plugins from this collection.
- hosts: all
tasks:
- name: "Generate meta/argument_specs.yml"
jomrr.dev.generate_argument_specs:
defaults_file: /path/to/role/defaults/main.yml
ouput_file: /path/to/role/meta/argument_specs.yaml
[defaults]
collections_path = ./collections
inventory = ./inventory.yml
playbook_dir = ./playbooks
roles_path = ./roles
remote_tmp = /tmp/ansible
pipelining = False
strategy = free
[inventory]
enable_plugins = jomrr.dev.ansible_role_inventory
---
plugin: jomrr.dev.ansible_role_inventory
base_path: "~/src/ansible/roles/"
search_prefix: ansible-role-
- fetch_github_repos: A module for fetching and caching repository data from Github.
- generate_argument_specs: A module for generating
meta/argument_specs.yml
from a roles'defaults/main.yml
.
- ansible_role_inventory: Inventory plugin for using role directories as inventory hosts with
ansible_connection=local
.
- github_version: Lookup plugin to fetch latest release version of a repo from Github.
- ansible >= 2.15
Contributions to this collection are welcome. Please ensure to follow best practices for Ansible role and module development, including documentation for new features and roles. For more details, see the CONTRIBUTING.md file.
- Jonas Mauer (@jomrr)