From 919dcfc6d09255140710063c8c20bdbe20127fab Mon Sep 17 00:00:00 2001 From: Carl Buchmann Date: Mon, 20 Nov 2023 19:28:42 -0500 Subject: [PATCH] add license to yaml files --- .pre-commit-config.yaml | 11 +++++++++++ .../cvp/roles/configlets_sync/handlers/main.yml | 3 +++ .../arista/cvp/roles/configlets_sync/tasks/init.yml | 3 +++ .../arista/cvp/roles/configlets_sync/tasks/main.yml | 3 +++ .../arista/cvp/roles/configlets_sync/tasks/pull.yml | 3 +++ .../arista/cvp/roles/configlets_sync/tasks/push.yml | 3 +++ .../arista/cvp/roles/configlets_sync/tasks/sync.yml | 3 +++ .../cvp/roles/dhcp_configuration/handlers/main.yml | 3 +++ .../cvp/roles/dhcp_configuration/tasks/fix-debian.yml | 3 +++ .../cvp/roles/dhcp_configuration/tasks/main.yml | 3 +++ .../cvp/roles/dhcp_configuration/tasks/offline.yml | 3 +++ .../cvp/roles/dhcp_configuration/tasks/online.yml | 3 +++ 12 files changed, 44 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03ea39a49..c79757e45 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,17 @@ repos: - --fuzzy-match-generates-todo - --no-extra-eol + - name: Check and insert license on select YAML files + id: insert-license + files: ansible_collections/arista/cvp/roles/.*/(handlers|tasks)/.*\.yml$ + args: + - --license-filepath + - development/license-short.txt + - --use-current-year + - --allow-past-years + - --fuzzy-match-generates-todo + - --no-extra-eol + - name: Check and insert license on Jinja2 files id: insert-license files: .*\.j2$ diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/handlers/main.yml b/ansible_collections/arista/cvp/roles/configlets_sync/handlers/main.yml index b12f2eee8..b45db1eb8 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/handlers/main.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/handlers/main.yml @@ -1,2 +1,5 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # handlers file for configlets-sync diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/init.yml b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/init.yml index 669d04606..4fad476d8 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/init.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/init.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # - name: 'creating folder {{ generated_configlets_dir }}' # file: diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/main.yml b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/main.yml index 07c226139..a113c192d 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/main.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/main.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # Manual action selection - name: 'load tasks for {{action}}' diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/pull.yml b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/pull.yml index 1a01bcd1d..06c760bb8 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/pull.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/pull.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # tasks file for configlets-sync - name: "collect facts from {{ inventory_hostname }}" diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/push.yml b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/push.yml index d26c67d34..8f26e2c52 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/push.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/push.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- - name: "collect CVP Facts" tags: diff --git a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/sync.yml b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/sync.yml index d1ff9fd48..46a077756 100644 --- a/ansible_collections/arista/cvp/roles/configlets_sync/tasks/sync.yml +++ b/ansible_collections/arista/cvp/roles/configlets_sync/tasks/sync.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. # Run everything if user set action=sync - name: 'Run init phase' include_tasks: "init.yml" diff --git a/ansible_collections/arista/cvp/roles/dhcp_configuration/handlers/main.yml b/ansible_collections/arista/cvp/roles/dhcp_configuration/handlers/main.yml index 05584009c..eb7085572 100644 --- a/ansible_collections/arista/cvp/roles/dhcp_configuration/handlers/main.yml +++ b/ansible_collections/arista/cvp/roles/dhcp_configuration/handlers/main.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # handlers file for ztp_configuration diff --git a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/fix-debian.yml b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/fix-debian.yml index 4214f37f1..01c9314ba 100644 --- a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/fix-debian.yml +++ b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/fix-debian.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- - name: 'set a default listening interface' lineinfile: diff --git a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/main.yml b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/main.yml index 66a77f76c..5fabb7d20 100644 --- a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/main.yml +++ b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/main.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- # tasks file for ztp-setup # If mode=online launch server configuration diff --git a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/offline.yml b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/offline.yml index 095ac95c5..b2b4fe505 100644 --- a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/offline.yml +++ b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/offline.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- - name: 'Generate DHCPd configuration file' template: diff --git a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/online.yml b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/online.yml index 021540697..3a19171ef 100644 --- a/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/online.yml +++ b/ansible_collections/arista/cvp/roles/dhcp_configuration/tasks/online.yml @@ -1,3 +1,6 @@ +# Copyright (c) 2023 Arista Networks, Inc. +# Use of this source code is governed by the Apache License 2.0 +# that can be found in the LICENSE file. --- - name: gather os specific variables for Centos / Red Hat OS include_vars: "centos-{{ ansible_distribution_major_version }}.yml"