feat(tooling): added role skeleton for new ansible roles generated using Task

This commit is contained in:
NaeiKinDus 2024-08-18 00:00:00 +00:00
parent 31aaf10a5c
commit b6695cf49c
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56
9 changed files with 54 additions and 1 deletions

View file

@ -125,7 +125,7 @@ tasks:
COLLECTION_NAME: '{{default "nullified.infrastructure" .COLLECTION_NAME}}'
ROLE_NAME: '{{index .MATCH 0}}'
cmds:
- '{{.PYTHON_WRAPPER}} ansible-galaxy role init {{.ROLE_NAME}} --init-path {{.COLLECTIONS_DIR}}/{{.COLLECTION_NAME | replace "." "/"}}/roles'
- '{{.PYTHON_WRAPPER}} ansible-galaxy role init {{.ROLE_NAME}} --role-skeleton ./templates/ansible_role_skeleton --init-path {{.COLLECTIONS_DIR}}/{{.COLLECTION_NAME | replace "." "/"}}/roles'
ansible:new:collection:*:
desc: create a new collection

View file

@ -0,0 +1,29 @@
Role Name
=========
@todo
Requirements
------------
@todo
Role Variables
--------------
@todo
Dependencies
------------
@todo
Example Playbook
----------------
@todo
License
-------
[MIT](https://opensource.org/license/mit)

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,13 @@
---
galaxy_info:
author: Florian L.
namespace: nullified
description:
license: MIT
min_ansible_version: 2.15
platforms:
- name: Debian
versions:
- bookworm
galaxy_tags: []
dependencies: []

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,2 @@
localhost

View file

@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- test

View file

@ -0,0 +1 @@
---