diff --git a/.github/patchback.yml b/.github/patchback.yml
index 33ad6e8..5ee7812 100644
--- a/.github/patchback.yml
+++ b/.github/patchback.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
backport_branch_prefix: patchback/backports/
backport_label_prefix: backport-
target_branch_prefix: stable-
diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml
index 7b0d08d..1343492 100644
--- a/.github/workflows/ansible-test.yml
+++ b/.github/workflows/ansible-test.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
name: CI
on:
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml
index 5c9d706..ef44a68 100644
--- a/.github/workflows/docs-pr.yml
+++ b/.github/workflows/docs-pr.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
name: Collection Docs
concurrency:
group: docs-${{ github.head_ref }}
diff --git a/.github/workflows/ee.yml b/.github/workflows/ee.yml
index 25600dc..8d005f4 100644
--- a/.github/workflows/ee.yml
+++ b/.github/workflows/ee.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
name: execution environment
on:
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
diff --git a/.github/workflows/extra-tests.yml b/.github/workflows/extra-tests.yml
index 5f29828..a4fe4b5 100644
--- a/.github/workflows/extra-tests.yml
+++ b/.github/workflows/extra-tests.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
name: extra-tests
on:
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
diff --git a/.github/workflows/import-galaxy.yml b/.github/workflows/import-galaxy.yml
index c7cb607..47b0db3 100644
--- a/.github/workflows/import-galaxy.yml
+++ b/.github/workflows/import-galaxy.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
name: import-galaxy
on:
# Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
diff --git a/.gitignore b/.gitignore
index 740c811..8e398ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
/tests/output/
/changelogs/.plugin-cache.yaml
diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt
new file mode 100644
index 0000000..6810e04
--- /dev/null
+++ b/LICENSES/BSD-2-Clause.txt
@@ -0,0 +1,8 @@
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt
new file mode 120000
index 0000000..012065c
--- /dev/null
+++ b/LICENSES/GPL-3.0-or-later.txt
@@ -0,0 +1 @@
+../COPYING
\ No newline at end of file
diff --git a/README.md b/README.md
index b1d52a9..0f1b363 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
+
+
# Community RouterOS Collection
[](https://github.com/ansible-collections/community.routeros/actions) [](https://codecov.io/gh/ansible-collections/community.routeros)
diff --git a/changelogs/config.yaml b/changelogs/config.yaml
index 8f014ed..70a1f67 100644
--- a/changelogs/config.yaml
+++ b/changelogs/config.yaml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
diff --git a/changelogs/fragments/101-licenses.yml b/changelogs/fragments/101-licenses.yml
new file mode 100644
index 0000000..e54f8a2
--- /dev/null
+++ b/changelogs/fragments/101-licenses.yml
@@ -0,0 +1,4 @@
+minor_changes:
+ - "All software licenses are now in the ``LICENSES/`` directory of the collection root. Moreover, ``SPDX-License-Identifier:`` is used to declare the applicable license for every file that is not automatically generated (https://github.com/ansible-collections/community.routeros/pull/101)."
+bugfixes:
+ - "Include ``LICENSES/BSD-2-Clause.txt`` file for the ``routeros`` module utils (https://github.com/ansible-collections/community.routeros/pull/101)."
diff --git a/codecov.yml b/codecov.yml
index 724e063..3b2f9ed 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,2 +1,7 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
fixes:
- "ansible_collections/community/routeros/::"
diff --git a/docs/docsite/extra-docs.yml b/docs/docsite/extra-docs.yml
index 385bd7e..6091591 100644
--- a/docs/docsite/extra-docs.yml
+++ b/docs/docsite/extra-docs.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
sections:
- title: Guides
toctree:
diff --git a/docs/docsite/links.yml b/docs/docsite/links.yml
index d95c205..9da799e 100644
--- a/docs/docsite/links.yml
+++ b/docs/docsite/links.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
edit_on_github:
repository: ansible-collections/community.routeros
branch: main
diff --git a/docs/docsite/rst/api-guide.rst b/docs/docsite/rst/api-guide.rst
index a8a9e9a..a3bb574 100644
--- a/docs/docsite/rst/api-guide.rst
+++ b/docs/docsite/rst/api-guide.rst
@@ -1,3 +1,8 @@
+..
+ Copyright (c) Ansible Project
+ GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+ SPDX-License-Identifier: GPL-3.0-or-later
+
.. _ansible_collections.community.routeros.docsite.api-guide:
How to connect to RouterOS devices with the RouterOS API
diff --git a/docs/docsite/rst/quoting.rst b/docs/docsite/rst/quoting.rst
index f17a861..785c7f8 100644
--- a/docs/docsite/rst/quoting.rst
+++ b/docs/docsite/rst/quoting.rst
@@ -1,3 +1,8 @@
+..
+ Copyright (c) Ansible Project
+ GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+ SPDX-License-Identifier: GPL-3.0-or-later
+
.. _ansible_collections.community.routeros.docsite.quoting:
How to quote and unquote commands and arguments
diff --git a/docs/docsite/rst/ssh-guide.rst b/docs/docsite/rst/ssh-guide.rst
index 4c59d5c..bdbdbfe 100644
--- a/docs/docsite/rst/ssh-guide.rst
+++ b/docs/docsite/rst/ssh-guide.rst
@@ -1,3 +1,8 @@
+..
+ Copyright (c) Ansible Project
+ GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+ SPDX-License-Identifier: GPL-3.0-or-later
+
.. _ansible_collections.community.routeros.docsite.ssh-guide:
How to connect to RouterOS devices with SSH
diff --git a/galaxy.yml b/galaxy.yml
index bae2ab9..2ba0a85 100644
--- a/galaxy.yml
+++ b/galaxy.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
# See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html
namespace: community
@@ -9,7 +14,9 @@ authors:
- Nikolay Dachev (github.com/NikolayDachev)
- Felix Fontein (github.com/felixfontein)
description: Modules for MikroTik RouterOS
-license_file: COPYING
+license:
+ - GPL-3.0-or-later
+#license_file: COPYING
tags:
- network
- mikrotik
diff --git a/meta/ee-requirements.txt b/meta/ee-requirements.txt
index f3d520b..a36140c 100644
--- a/meta/ee-requirements.txt
+++ b/meta/ee-requirements.txt
@@ -1 +1,5 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
librouteros
diff --git a/meta/execution-environment.yml b/meta/execution-environment.yml
index c899493..ac7ebac 100644
--- a/meta/execution-environment.yml
+++ b/meta/execution-environment.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
version: 1
dependencies:
python: meta/ee-requirements.txt
diff --git a/meta/runtime.yml b/meta/runtime.yml
index 6a8be34..6668842 100644
--- a/meta/runtime.yml
+++ b/meta/runtime.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
requires_ansible: '>=2.9.10'
action_groups:
api:
diff --git a/plugins/cliconf/routeros.py b/plugins/cliconf/routeros.py
index f46b3a0..6a5cb2c 100644
--- a/plugins/cliconf/routeros.py
+++ b/plugins/cliconf/routeros.py
@@ -1,21 +1,7 @@
-#
-# (c) 2017 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
-#
+# Copyright (c) 2017 Red Hat Inc.
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/doc_fragments/api.py b/plugins/doc_fragments/api.py
index 6995c5c..ddbea6d 100644
--- a/plugins/doc_fragments/api.py
+++ b/plugins/doc_fragments/api.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2020, Nikolay Dachev
+# Copyright (c) 2020, Nikolay Dachev
# GNU General Public License v3.0+ https://www.gnu.org/licenses/gpl-3.0.txt
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/filter/join.yml b/plugins/filter/join.yml
index 1642ef1..9ff8a50 100644
--- a/plugins/filter/join.yml
+++ b/plugins/filter/join.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
DOCUMENTATION:
name: join
short_description: Join a list of arguments to a command
diff --git a/plugins/filter/list_to_dict.yml b/plugins/filter/list_to_dict.yml
index bfac7c4..920414c 100644
--- a/plugins/filter/list_to_dict.yml
+++ b/plugins/filter/list_to_dict.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
DOCUMENTATION:
name: list_to_dict
short_description: Convert a list of arguments to a dictionary
diff --git a/plugins/filter/quote_argument.yml b/plugins/filter/quote_argument.yml
index 4389fc5..26a1f04 100644
--- a/plugins/filter/quote_argument.yml
+++ b/plugins/filter/quote_argument.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
DOCUMENTATION:
name: quote_argument
short_description: Quote an argument
diff --git a/plugins/filter/quote_argument_value.yml b/plugins/filter/quote_argument_value.yml
index 65f50d0..839895b 100644
--- a/plugins/filter/quote_argument_value.yml
+++ b/plugins/filter/quote_argument_value.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
DOCUMENTATION:
name: quote_argument_value
short_description: Quote an argument value
diff --git a/plugins/filter/quoting.py b/plugins/filter/quoting.py
index aabb421..3985d55 100644
--- a/plugins/filter/quoting.py
+++ b/plugins/filter/quoting.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2021, Felix Fontein
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2021, Felix Fontein
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/plugins/filter/split.yml b/plugins/filter/split.yml
index d56b820..5fc4b30 100644
--- a/plugins/filter/split.yml
+++ b/plugins/filter/split.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
DOCUMENTATION:
name: split
short_description: Split a command into arguments
diff --git a/plugins/module_utils/__init__.py b/plugins/module_utils/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py
index ab771d0..1b8bafa 100644
--- a/plugins/module_utils/_api_data.py
+++ b/plugins/module_utils/_api_data.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2022, Felix Fontein (@felixfontein)
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2022, Felix Fontein (@felixfontein)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# The data inside here is private to this collection. If you use this from outside the collection,
# you are on your own. There can be random changes to its format even in bugfix releases!
diff --git a/plugins/module_utils/api.py b/plugins/module_utils/api.py
index 7150dcc..f4060f1 100644
--- a/plugins/module_utils/api.py
+++ b/plugins/module_utils/api.py
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2022, Felix Fontein (@felixfontein)
-# Copyright: (c) 2020, Nikolay Dachev
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2022, Felix Fontein (@felixfontein)
+# Copyright (c) 2020, Nikolay Dachev
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/plugins/module_utils/quoting.py b/plugins/module_utils/quoting.py
index 5524de4..4b70989 100644
--- a/plugins/module_utils/quoting.py
+++ b/plugins/module_utils/quoting.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2021, Felix Fontein (@felixfontein)
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2021, Felix Fontein (@felixfontein)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/plugins/module_utils/routeros.py b/plugins/module_utils/routeros.py
index e0488b2..3efd524 100644
--- a/plugins/module_utils/routeros.py
+++ b/plugins/module_utils/routeros.py
@@ -1,30 +1,6 @@
-# This code is part of Ansible, but is an independent component.
-# This particular file snippet, and this file snippet only, is BSD licensed.
-# Modules you write using this snippet, which is embedded dynamically by Ansible
-# still belong to the author of the module, and may assign their own license
-# to the complete work.
-#
-# (c) 2016 Red Hat Inc.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
+# Copyright (c) 2016 Red Hat Inc.
+# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
+# SPDX-License-Identifier: BSD-2-Clause
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/plugins/modules/api.py b/plugins/modules/api.py
index ddd026c..9ead0f3 100644
--- a/plugins/modules/api.py
+++ b/plugins/modules/api.py
@@ -1,8 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# Copyright: (c) 2020, Nikolay Dachev
+# Copyright (c) 2020, Nikolay Dachev
# GNU General Public License v3.0+ https://www.gnu.org/licenses/gpl-3.0.txt
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/modules/api_facts.py b/plugins/modules/api_facts.py
index b5d0e17..7cc2aa3 100644
--- a/plugins/modules/api_facts.py
+++ b/plugins/modules/api_facts.py
@@ -1,9 +1,10 @@
#!/usr/bin/python
-# Copyright: (c) 2022, Felix Fontein
-# Copyright: (c) 2020, Nikolay Dachev
-# Copyright: (c) 2018, Egor Zaitsev (@heuels)
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2022, Felix Fontein
+# Copyright (c) 2020, Nikolay Dachev
+# Copyright (c) 2018, Egor Zaitsev (@heuels)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/modules/api_find_and_modify.py b/plugins/modules/api_find_and_modify.py
index e1265a0..099d739 100644
--- a/plugins/modules/api_find_and_modify.py
+++ b/plugins/modules/api_find_and_modify.py
@@ -1,8 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# Copyright: (c) 2022, Felix Fontein
+# Copyright (c) 2022, Felix Fontein
# GNU General Public License v3.0+ https://www.gnu.org/licenses/gpl-3.0.txt
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/modules/command.py b/plugins/modules/command.py
index f292792..c96e153 100644
--- a/plugins/modules/command.py
+++ b/plugins/modules/command.py
@@ -1,6 +1,8 @@
#!/usr/bin/python
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/modules/facts.py b/plugins/modules/facts.py
index 3b423ca..383f940 100644
--- a/plugins/modules/facts.py
+++ b/plugins/modules/facts.py
@@ -1,6 +1,8 @@
#!/usr/bin/python
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/plugins/terminal/routeros.py b/plugins/terminal/routeros.py
index 8648ff5..a2646e3 100644
--- a/plugins/terminal/routeros.py
+++ b/plugins/terminal/routeros.py
@@ -1,21 +1,7 @@
-#
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
-#
+# Copyright (c) 2016 Red Hat Inc.
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/tests/config.yml b/tests/config.yml
index ba0238e..38590f2 100644
--- a/tests/config.yml
+++ b/tests/config.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
# See template for more information:
# https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/config/config.yml
modules:
diff --git a/tests/ee/all.yml b/tests/ee/all.yml
index 7593912..26f198b 100644
--- a/tests/ee/all.yml
+++ b/tests/ee/all.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
- hosts: localhost
tasks:
- name: Find all roles
diff --git a/tests/ee/roles/filter_quoting/aliases b/tests/ee/roles/filter_quoting/aliases
index 54ea5a3..ddba818 100644
--- a/tests/ee/roles/filter_quoting/aliases
+++ b/tests/ee/roles/filter_quoting/aliases
@@ -1,2 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
shippable/posix/group1
skip/python2.6
diff --git a/tests/ee/roles/filter_quoting/tasks/main.yml b/tests/ee/roles/filter_quoting/tasks/main.yml
index bebed37..e7a2d29 100644
--- a/tests/ee/roles/filter_quoting/tasks/main.yml
+++ b/tests/ee/roles/filter_quoting/tasks/main.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
- name: "Test split filter"
assert:
that:
diff --git a/tests/ee/roles/smoke/tasks/main.yml b/tests/ee/roles/smoke/tasks/main.yml
index 33adbff..072f4cc 100644
--- a/tests/ee/roles/smoke/tasks/main.yml
+++ b/tests/ee/roles/smoke/tasks/main.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
- name: Run api module
community.routeros.api:
username: foo
diff --git a/tests/integration/targets/filter_quoting/aliases b/tests/integration/targets/filter_quoting/aliases
index 54ea5a3..ddba818 100644
--- a/tests/integration/targets/filter_quoting/aliases
+++ b/tests/integration/targets/filter_quoting/aliases
@@ -1,2 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
shippable/posix/group1
skip/python2.6
diff --git a/tests/integration/targets/filter_quoting/tasks/main.yml b/tests/integration/targets/filter_quoting/tasks/main.yml
index bebed37..e7a2d29 100644
--- a/tests/integration/targets/filter_quoting/tasks/main.yml
+++ b/tests/integration/targets/filter_quoting/tasks/main.yml
@@ -1,4 +1,8 @@
---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
- name: "Test split filter"
assert:
that:
diff --git a/tests/requirements.yml b/tests/requirements.yml
index a218740..0186af5 100644
--- a/tests/requirements.yml
+++ b/tests/requirements.yml
@@ -1,3 +1,8 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
integration_tests_dependencies:
- ansible.netcommon
unit_tests_dependencies:
diff --git a/tests/sanity/extra/extra-docs.py b/tests/sanity/extra/extra-docs.py
index f2746e5..6731049 100755
--- a/tests/sanity/extra/extra-docs.py
+++ b/tests/sanity/extra/extra-docs.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# Copyright (c) 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 LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Check extra collection docs with antsibull-docs."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/tests/sanity/extra/licenses.json b/tests/sanity/extra/licenses.json
new file mode 100644
index 0000000..50e47ca
--- /dev/null
+++ b/tests/sanity/extra/licenses.json
@@ -0,0 +1,4 @@
+{
+ "include_symlinks": false,
+ "output": "path-message"
+}
diff --git a/tests/sanity/extra/licenses.py b/tests/sanity/extra/licenses.py
new file mode 100755
index 0000000..fe02989
--- /dev/null
+++ b/tests/sanity/extra/licenses.py
@@ -0,0 +1,111 @@
+#!/usr/bin/env python
+# Copyright (c) 2022, Felix Fontein
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+"""Prevent files without a correct license identifier from being added to the source tree."""
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import os
+import glob
+import sys
+
+
+def format_license_list(licenses):
+ if not licenses:
+ return '(empty)'
+ return ', '.join(['"%s"' % license for license in licenses])
+
+
+def find_licenses(filename, relax=False):
+ spdx_license_identifiers = []
+ other_license_identifiers = []
+ has_copyright = False
+ with open(filename, 'r') as f:
+ for line in f:
+ line = line.rstrip()
+ if 'Copyright ' in line:
+ has_copyright = True
+ if 'Copyright: ' in line:
+ print('%s: found copyright line with "Copyright:". Please remove the colon.' % (filename, ))
+ idx = line.find('SPDX-License-Identifier: ')
+ if idx >= 0:
+ spdx_license_identifiers.append(line[idx + len('SPDX-License-Identifier: '):])
+ if 'GNU General Public License' in line:
+ if 'v3.0+' in line:
+ other_license_identifiers.append('GPL-3.0-or-later')
+ if 'version 3 or later' in line:
+ other_license_identifiers.append('GPL-3.0-or-later')
+ if 'Simplified BSD License' in line:
+ other_license_identifiers.append('BSD-2-Clause')
+ if 'Apache License 2.0' in line:
+ other_license_identifiers.append('Apache-2.0')
+ if 'PSF License' in line or 'Python-2.0' in line:
+ other_license_identifiers.append('PSF-2.0')
+ if 'MIT License' in line:
+ other_license_identifiers.append('MIT')
+ if len(set(spdx_license_identifiers)) < len(spdx_license_identifiers):
+ print('%s: found identical SPDX-License-Identifier values' % (filename, ))
+ if other_license_identifiers and set(other_license_identifiers) != set(spdx_license_identifiers):
+ print('%s: SPDX-License-Identifier yielded the license list %s, while manual guessing yielded the license list %s' % (
+ filename, format_license_list(spdx_license_identifiers), format_license_list(other_license_identifiers)))
+ if not has_copyright and not relax:
+ print('%s: found no copyright notice' % (filename, ))
+ return sorted(spdx_license_identifiers)
+
+
+def main():
+ """Main entry point."""
+ paths = sys.argv[1:] or sys.stdin.read().splitlines()
+
+ no_comments_allowed = [
+ 'changelogs/fragments/*.yml',
+ 'tests/sanity/extra/*.json',
+ 'tests/sanity/ignore-2.*.txt',
+ 'tests/unit/plugins/modules/fixtures/*',
+ 'tests/unit/plugins/modules/fixtures/facts/*',
+ 'LICENSES/*.txt',
+ 'COPYING',
+ ]
+
+ empty_allowed = [
+ '.keep',
+ '__init__.py',
+ ]
+
+ ignore_paths = [
+ 'CHANGELOG.rst',
+ 'changelogs/changelog.yaml',
+ 'tests/sanity/extra/licenses.py', # The strings in find_licenses() confuse this code :-)
+ '.ansible-test-timeout.json',
+ ]
+
+ no_comments_allowed = [fn for pattern in no_comments_allowed for fn in glob.glob(pattern)]
+ ignore_paths = [fn for pattern in ignore_paths for fn in glob.glob(pattern)]
+
+ valid_licenses = [license_file[len('LICENSES/'):-len('.txt')] for license_file in glob.glob('LICENSES/*.txt')]
+
+ for path in paths:
+ if path.startswith('./'):
+ path = path[2:]
+ if path in ignore_paths or path.startswith('tests/output/'):
+ continue
+ if os.path.basename(path) in empty_allowed:
+ if os.stat(path).st_size == 0:
+ continue
+ valid_licenses_for_path = valid_licenses
+ if path.startswith('plugins/') and not path.startswith(('plugins/modules/', 'plugins/module_utils/')):
+ valid_licenses_for_path = [license for license in valid_licenses if license == 'GPL-3.0-or-later']
+ licenses = find_licenses(path, relax=path in no_comments_allowed)
+ if not licenses:
+ if path not in no_comments_allowed:
+ print('%s: must have at least one license' % (path, ))
+ else:
+ for license in licenses:
+ if license not in valid_licenses_for_path:
+ print('%s: found not allowed license "%s", must be one of %s' % (
+ path, license, format_license_list(valid_licenses_for_path)))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/tests/sanity/extra/no-unwanted-files.py b/tests/sanity/extra/no-unwanted-files.py
index 4522f77..b39df83 100755
--- a/tests/sanity/extra/no-unwanted-files.py
+++ b/tests/sanity/extra/no-unwanted-files.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# Copyright (c) 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 LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Prevent unwanted files from being added to the source tree."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py
index f60ee67..b0cc618 100644
--- a/tests/unit/compat/builtins.py
+++ b/tests/unit/compat/builtins.py
@@ -1,19 +1,6 @@
-# (c) 2014, Toshio Kuratomi
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) 2014, Toshio Kuratomi
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py
index 0972cd2..f8f565d 100644
--- a/tests/unit/compat/mock.py
+++ b/tests/unit/compat/mock.py
@@ -1,19 +1,6 @@
-# (c) 2014, Toshio Kuratomi
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) 2014, Toshio Kuratomi
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/compat/unittest.py b/tests/unit/compat/unittest.py
index 98f08ad..1872e58 100644
--- a/tests/unit/compat/unittest.py
+++ b/tests/unit/compat/unittest.py
@@ -1,19 +1,6 @@
-# (c) 2014, Toshio Kuratomi
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) 2014, Toshio Kuratomi
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/module_utils/test__api_data.py b/tests/unit/plugins/module_utils/test__api_data.py
index 5053ca9..67b5b1b 100644
--- a/tests/unit/plugins/module_utils/test__api_data.py
+++ b/tests/unit/plugins/module_utils/test__api_data.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2021, Felix Fontein (@felixfontein)
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2021, Felix Fontein (@felixfontein)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/tests/unit/plugins/module_utils/test_quoting.py b/tests/unit/plugins/module_utils/test_quoting.py
index fe13b66..6d29d50 100644
--- a/tests/unit/plugins/module_utils/test_quoting.py
+++ b/tests/unit/plugins/module_utils/test_quoting.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright: (c) 2021, Felix Fontein (@felixfontein)
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (c) 2021, Felix Fontein (@felixfontein)
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/tests/unit/plugins/modules/__init__.py b/tests/unit/plugins/modules/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/plugins/modules/fake_api.py b/tests/unit/plugins/modules/fake_api.py
index edfa28a..95d59ba 100644
--- a/tests/unit/plugins/modules/fake_api.py
+++ b/tests/unit/plugins/modules/fake_api.py
@@ -1,17 +1,6 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/fixtures/__init__.py b/tests/unit/plugins/modules/fixtures/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/unit/plugins/modules/routeros_module.py b/tests/unit/plugins/modules/routeros_module.py
index 9cad18e..0ec44f7 100644
--- a/tests/unit/plugins/modules/routeros_module.py
+++ b/tests/unit/plugins/modules/routeros_module.py
@@ -1,19 +1,6 @@
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) 2016 Red Hat Inc.
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/test_api.py b/tests/unit/plugins/modules/test_api.py
index 94982ac..be63393 100644
--- a/tests/unit/plugins/modules/test_api.py
+++ b/tests/unit/plugins/modules/test_api.py
@@ -1,17 +1,6 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/test_api_facts.py b/tests/unit/plugins/modules/test_api_facts.py
index 0c41806..8c34be2 100644
--- a/tests/unit/plugins/modules/test_api_facts.py
+++ b/tests/unit/plugins/modules/test_api_facts.py
@@ -1,17 +1,6 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/test_api_find_and_modify.py b/tests/unit/plugins/modules/test_api_find_and_modify.py
index 5655d02..e1b1645 100644
--- a/tests/unit/plugins/modules/test_api_find_and_modify.py
+++ b/tests/unit/plugins/modules/test_api_find_and_modify.py
@@ -1,17 +1,6 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/test_command.py b/tests/unit/plugins/modules/test_command.py
index 0bb4f07..3fc5865 100644
--- a/tests/unit/plugins/modules/test_command.py
+++ b/tests/unit/plugins/modules/test_command.py
@@ -1,19 +1,6 @@
-# (c) 2016 Red Hat Inc.
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) 2016 Red Hat Inc.
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/test_facts.py b/tests/unit/plugins/modules/test_facts.py
index 9552047..322fdda 100644
--- a/tests/unit/plugins/modules/test_facts.py
+++ b/tests/unit/plugins/modules/test_facts.py
@@ -1,17 +1,6 @@
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see .
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py
index 0468b68..419eef1 100644
--- a/tests/unit/plugins/modules/utils.py
+++ b/tests/unit/plugins/modules/utils.py
@@ -1,3 +1,7 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
from __future__ import absolute_import, division, print_function
__metaclass__ = type
diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt
index 0b66e0a..479f2fc 100644
--- a/tests/unit/requirements.txt
+++ b/tests/unit/requirements.txt
@@ -1,2 +1,6 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
unittest2 ; python_version <= '2.6'
ordereddict ; python_version <= '2.6'