ansible-galaxy, clarify licensing for 'init' templates and results (#83175)

This commit is contained in:
Brian Coca 2024-05-06 16:22:52 -04:00 committed by GitHub
parent f5b945bf6a
commit aed8c080f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1,7 @@
All templates, files and files generated from them in the subdirectories of this one
are subject to the MIT license when applicable.
MIT License:
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.
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.

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
FROM ansibleplaybookbundle/apb-base
LABEL "com.redhat.apb.spec"=\

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
DOCKERHOST = DOCKERHOST
DOCKERORG = DOCKERORG
IMAGENAME = {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
version: '1.0.0'
name: {{ role_name }}
description: {{ description }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
galaxy_info:
author: {{ author }}
description: {{ description }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
- name: "{{ role_name }} playbook to deprovision the application"
hosts: localhost
gather_facts: false

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
- name: "{{ role_name }} playbook to provision the application"
hosts: localhost
gather_facts: false

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
[defaults]
inventory=./inventory

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
localhost

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
gather_facts: no

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
# Copyright (c) 2019 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
# Add your Ansible Container service definitions here.
# For example:
#

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
galaxy_info:
author: {{ author }}
description: {{ description }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
[defaults]
inventory=./inventory

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
localhost

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
gather_facts: no

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for {{ role_name }}

View file

@ -1,3 +1,4 @@
{# SPDX-License-Identifier: MIT-0 #}
# Ansible Collection - {{ namespace }}.{{ collection_name }}
Documentation for the collection.

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
### REQUIRED
{% for option in required_config %}
{{ option.description | comment_ify }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
---
# Collections must specify a minimum required ansible version to upload
# to galaxy

View file

@ -1,3 +1,4 @@
{# SPDX-License-Identifier: MIT-0 #}
# Collections Plugins Directory
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
galaxy_info:
author: {{ author }}
description: {{ description }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for {{ role_name }}

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
localhost

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
remote_user: root

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
galaxy_info:
author: {{ author }}
description: {{ description }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for {{ role_name }}

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
#
# (c) 2018 Red Hat Inc.
#

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
localhost

View file

@ -1,3 +1,4 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
connection: network_cli

View file

@ -1,2 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for {{ role_name }}

View file

@ -48,6 +48,7 @@ scripts =
ansible =
config/*.yml
executor/powershell/*.ps1
galaxy/data/COPYING
galaxy/data/*.yml
galaxy/data/*/*.j2
galaxy/data/*/*.md

View file

@ -307,7 +307,10 @@ class ValidRoleTests(object):
for d in need_main_ymls:
main_yml = os.path.join(self.role_dir, d, 'main.yml')
self.assertTrue(os.path.exists(main_yml))
expected_string = "---\n# {0} file for {1}".format(d, self.role_name)
if self.role_name == 'delete_me_skeleton':
expected_string = "---\n# {0} file for {1}".format(d, self.role_name)
else:
expected_string = "#SPDX-License-Identifier: MIT-0\n---\n# {0} file for {1}".format(d, self.role_name)
with open(main_yml, 'r') as f:
self.assertEqual(expected_string, f.read().strip())