commit 48bb0c136a989e3f3e134c08558191b6e8baf0c0 Author: Robert Kaussow Date: Mon Aug 17 20:47:55 2020 +0200 initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bb3e998 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Robert Kaussow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..eda336a --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# cookiecutter-ansible-collection + +Cookiecutter recipe to easily create Ansible collection. + +Usage: `cookiecutter https://gitea.rknet.org/xoxys/cookiecutter-ansible-collection` + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## Maintainers and Contributors + +[Robert Kaussow](https://gitea.rknet.org/xoxys) diff --git a/cookiecutter.json b/cookiecutter.json new file mode 100644 index 0000000..88aede7 --- /dev/null +++ b/cookiecutter.json @@ -0,0 +1,10 @@ +{ + "author": "xoxys", + "author_full": "Robert Kaussow", + "author_email": "mail@thegeeklab.de", + "collection_name": "my_collection", + "collection_description_short": "My demo collection", + "collection_category": "misc", + "git_server": "gitea.rknet.org:ansible", + "license_year": "{% now 'Europe/Berlin', '%Y' %}" +} diff --git a/hooks/post_gen_project.sh b/hooks/post_gen_project.sh new file mode 100644 index 0000000..feeb07f --- /dev/null +++ b/hooks/post_gen_project.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +if hash git 2>/dev/null; then + git init + git remote add origin gitea@{{ cookiecutter.git_server }}/xoxys.{{ cookiecutter.collection_name }}.git +fi diff --git a/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/LICENSE b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/LICENSE new file mode 100644 index 0000000..d36f844 --- /dev/null +++ b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) {{ cookiecutter.license_year }} {{ cookiecutter.author_full }} <{{ cookiecutter.author_email }}> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/README.md b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/README.md new file mode 100644 index 0000000..1e87102 --- /dev/null +++ b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/README.md @@ -0,0 +1,14 @@ +# {{ cookiecutter.namespace }}.{{ cookiecutter.collection_name }} + +[![Build Status](https://img.shields.io/drone/build/ansible/{{ cookiecutter.namespace }}.{{ cookiecutter.collection_name }}?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/{{ cookiecutter.author }}.{{ cookiecutter.collection_name }}) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](LICENSE) + +{{ collection_description_short }}. + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## Maintainers and Contributors + +[{{ cookiecutter.author_full }}](https://gitea.rknet.org/{{ cookiecutter.author }}) diff --git a/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/galaxy.yml b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/galaxy.yml new file mode 100644 index 0000000..f6ac424 --- /dev/null +++ b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/galaxy.yml @@ -0,0 +1,15 @@ +namespace: {{ cookiecutter.namespace }} +name: {{ cookiecutter.collection_name }} +version: 1.0.0 +readme: README.md +authors: + - {{ author_full }} <{{ author_email }}> +description: {{ collection_description_short }} +license: + - MIT +license_file: "LICENSE" +tags: + - {{ collection_category }} +dependencies: {} +repository: https://gitea.rknet.org/ansible/{{ cookiecutter.namespace }}.{{ cookiecutter.collection_name }} +homepage: https://thegeeklab.de/ diff --git a/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/plugins/README.md b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/plugins/README.md new file mode 100644 index 0000000..6541cf7 --- /dev/null +++ b/{{cookiecutter.namespace}}.{{cookiecutter.collection_name}}/plugins/README.md @@ -0,0 +1,31 @@ +# Collections Plugins Directory + +This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that +is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that +would contain module utils and modules respectively. + +Here is an example directory of the majority of plugins currently supported by Ansible: + +``` +└── plugins + ├── action + ├── become + ├── cache + ├── callback + ├── cliconf + ├── connection + ├── filter + ├── httpapi + ├── inventory + ├── lookup + ├── module_utils + ├── modules + ├── netconf + ├── shell + ├── strategy + ├── terminal + ├── test + └── vars +``` + +A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible/2.9/plugins/plugins.html). \ No newline at end of file