From 91efc3cd8818e97e67c694411fce296c88154a8b Mon Sep 17 00:00:00 2001 From: Mauritz Uphoff Date: Fri, 26 Jun 2026 08:56:04 +0200 Subject: [PATCH] fix(cloud-init): remove license header for cloud-init files --- .pre-commit-config.yaml | 4 ++-- .../apache-debug-user.yaml | 14 -------------- .../apache-debug-user.yaml | 14 -------------- examples/iaas-ha-vrrp/cloud-init.yaml | 14 -------------- examples/iaas-volume-encryption/cloud-init.yaml | 14 -------------- .../cloud-init/user-init-linux.yml | 14 -------------- .../cloud-init/user-init-windows.yml | 14 -------------- .../stackit-sna-with-debug-machine/debug-user.yml | 14 -------------- 8 files changed, 2 insertions(+), 100 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 880d108..c98fd9a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,8 +63,8 @@ repos: # Requires `addlicense` to be installed locally (go install github.com/google/addlicense@latest) - id: addlicense name: Add License Headers - description: Ensures all files have the Apache 2.0 license header - entry: addlicense -c "Schwarz Digits Cloud GmbH & Co. KG" -l apache + description: Ensures all files have the Apache 2.0 license header (skips files starting with #cloud-config) + entry: bash -c 'for f in "$@"; do head -n 1 "$f" | grep -q "^#cloud-config" || addlicense -c "Schwarz Digits Cloud GmbH & Co. KG" -l apache "$f"; done' -- language: system types_or: [terraform, python, go, javascript, yaml, json, html, css] pass_filenames: true diff --git a/examples/iaas-cross-az-layer4-loadbalancer/apache-debug-user.yaml b/examples/iaas-cross-az-layer4-loadbalancer/apache-debug-user.yaml index 74c4065..c44cda9 100644 --- a/examples/iaas-cross-az-layer4-loadbalancer/apache-debug-user.yaml +++ b/examples/iaas-cross-az-layer4-loadbalancer/apache-debug-user.yaml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config users: - name: debug diff --git a/examples/iaas-cross-az-layer7-loadbalancer-waf/apache-debug-user.yaml b/examples/iaas-cross-az-layer7-loadbalancer-waf/apache-debug-user.yaml index 74c4065..c44cda9 100644 --- a/examples/iaas-cross-az-layer7-loadbalancer-waf/apache-debug-user.yaml +++ b/examples/iaas-cross-az-layer7-loadbalancer-waf/apache-debug-user.yaml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config users: - name: debug diff --git a/examples/iaas-ha-vrrp/cloud-init.yaml b/examples/iaas-ha-vrrp/cloud-init.yaml index 8224582..596b229 100644 --- a/examples/iaas-ha-vrrp/cloud-init.yaml +++ b/examples/iaas-ha-vrrp/cloud-init.yaml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config # Update apt database on first boot (run 'apt-get update'). # Note, if packages are given, or package_upgrade is true, then diff --git a/examples/iaas-volume-encryption/cloud-init.yaml b/examples/iaas-volume-encryption/cloud-init.yaml index 8b26cf3..653b5c6 100644 --- a/examples/iaas-volume-encryption/cloud-init.yaml +++ b/examples/iaas-volume-encryption/cloud-init.yaml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config users: - name: Administrator diff --git a/examples/opnsense-hub-and-spoke/cloud-init/user-init-linux.yml b/examples/opnsense-hub-and-spoke/cloud-init/user-init-linux.yml index fb07b83..be6e579 100644 --- a/examples/opnsense-hub-and-spoke/cloud-init/user-init-linux.yml +++ b/examples/opnsense-hub-and-spoke/cloud-init/user-init-linux.yml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config # --------------------------------------------------------------------------- # Example cloud-init for Linux instances (RHEL / Debian). diff --git a/examples/opnsense-hub-and-spoke/cloud-init/user-init-windows.yml b/examples/opnsense-hub-and-spoke/cloud-init/user-init-windows.yml index e7bf80d..89103d4 100644 --- a/examples/opnsense-hub-and-spoke/cloud-init/user-init-windows.yml +++ b/examples/opnsense-hub-and-spoke/cloud-init/user-init-windows.yml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config # --------------------------------------------------------------------------- # Example cloud-init for Windows Server instances. diff --git a/examples/vpn-usecases/modules/stackit-sna-with-debug-machine/debug-user.yml b/examples/vpn-usecases/modules/stackit-sna-with-debug-machine/debug-user.yml index 90b0227..865ffb5 100644 --- a/examples/vpn-usecases/modules/stackit-sna-with-debug-machine/debug-user.yml +++ b/examples/vpn-usecases/modules/stackit-sna-with-debug-machine/debug-user.yml @@ -1,17 +1,3 @@ -# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - #cloud-config # --------------------------------------------------------------------------- # Example cloud-init for Linux instances (RHEL / Debian). -- 2.49.1