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

pull/82624/merge
Brian Coca 4 weeks ago committed by GitHub
parent f5b945bf6a
commit aed8c080f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -307,7 +307,10 @@ class ValidRoleTests(object):
for d in need_main_ymls: for d in need_main_ymls:
main_yml = os.path.join(self.role_dir, d, 'main.yml') main_yml = os.path.join(self.role_dir, d, 'main.yml')
self.assertTrue(os.path.exists(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: with open(main_yml, 'r') as f:
self.assertEqual(expected_string, f.read().strip()) self.assertEqual(expected_string, f.read().strip())

Loading…
Cancel
Save