From 7ca302c26df5d6f56026241de56f39bc22de00c4 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 23 May 2024 09:57:52 +0100 Subject: [PATCH 1/2] ansible: create collection to store reusable roles. While the previous approach worked for a single repository, it did not work for repo that might want to also use the Ansible roles. Ansible solves the problem of a group of roles in a single repo with collections. A collection allows importers to use the group of Ansible resources in a similar manner to a single repo that contains a role. This allows both this repo and others to use the available Ansible resources, without duplication. In order to make this change, the location of the Ansible roles has moved in order to match the collection namespace and name. It also removes the role path configuration and updates the playbooks to use the namespace collection. --- README.md | 4 ++-- ansible.cfg | 2 -- infra/eu-west-2/core/ansible/ansible.cfg | 1 - infra/eu-west-2/core/ansible/playbook_bastion.yaml | 6 +++--- infra/eu-west-2/core/ansible/playbook_client.yaml | 8 ++++---- infra/eu-west-2/core/ansible/playbook_lb.yaml | 4 ++-- infra/eu-west-2/core/ansible/playbook_server.yaml | 6 +++--- .../test-cluster-template/ansible/ansible.cfg | 1 - .../test-cluster-template/ansible/playbook.yaml | 8 ++++---- shared/ansible/hashicorp/nomad_bench/galaxy.yml | 8 ++++++++ .../ansible/hashicorp/nomad_bench/requirements.txt | 11 +++++++++++ .../ansible/hashicorp/nomad_bench/requirements.yaml | 12 ++++++++++++ .../{ => hashicorp/nomad_bench}/roles/.gitignore | 0 .../nomad_bench}/roles/build/defaults/main.yaml | 0 .../nomad_bench}/roles/build/tasks/main.yaml | 0 .../nomad_bench}/roles/cni/defaults/main.yaml | 0 .../nomad_bench}/roles/cni/tasks/install.yaml | 0 .../nomad_bench}/roles/cni/tasks/main.yaml | 0 .../nomad_bench}/roles/common/tasks/main.yaml | 0 .../roles/influxdb_telegraf/defaults/main.yaml | 0 .../roles/influxdb_telegraf/handlers/main.yaml | 0 .../roles/influxdb_telegraf/tasks/main.yaml | 0 .../roles/influxdb_telegraf/templates/base.conf.j2 | 0 .../templates/influxdb_telegraf.service.j2 | 0 .../nomad_bench}/roles/nomad/defaults/main.yaml | 0 .../roles/nomad/files/anonymous.policy.hcl | 0 .../nomad_bench}/roles/nomad/handlers/main.yaml | 0 .../roles/nomad/tasks/acl_bootstrap.yaml | 0 .../nomad_bench}/roles/nomad/tasks/host_volume.yaml | 0 .../nomad_bench}/roles/nomad/tasks/main.yaml | 0 .../nomad_bench}/roles/nomad/tasks/tls.yaml | 0 .../nomad_bench}/roles/nomad/templates/base.hcl.j2 | 0 .../nomad_bench}/roles/nomad/templates/client.hcl.j2 | 0 .../roles/nomad/templates/host-volume.hcl.j2 | 0 .../roles/nomad/templates/nomad_profile.sh.j2 | 0 .../nomad_bench}/roles/nomad/templates/server.hcl.j2 | 0 .../nomad_bench}/roles/nomad/templates/tls.hcl.j2 | 0 .../nomad_bench}/roles/nomad_lb/defaults/main.yaml | 0 .../nomad_bench}/roles/nomad_lb/handlers/main.yaml | 0 .../nomad_bench}/roles/nomad_lb/tasks/main.yaml | 0 .../roles/nomad_lb/templates/nginx.conf.j2 | 0 shared/ansible/requirements.yaml | 3 +++ 42 files changed, 52 insertions(+), 22 deletions(-) delete mode 100644 ansible.cfg create mode 100644 shared/ansible/hashicorp/nomad_bench/galaxy.yml create mode 100644 shared/ansible/hashicorp/nomad_bench/requirements.txt create mode 100644 shared/ansible/hashicorp/nomad_bench/requirements.yaml rename shared/ansible/{ => hashicorp/nomad_bench}/roles/.gitignore (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/build/defaults/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/build/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/cni/defaults/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/cni/tasks/install.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/cni/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/common/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/influxdb_telegraf/defaults/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/influxdb_telegraf/handlers/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/influxdb_telegraf/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/influxdb_telegraf/templates/base.conf.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/influxdb_telegraf/templates/influxdb_telegraf.service.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/defaults/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/files/anonymous.policy.hcl (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/handlers/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/tasks/acl_bootstrap.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/tasks/host_volume.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/tasks/tls.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/base.hcl.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/client.hcl.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/host-volume.hcl.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/nomad_profile.sh.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/server.hcl.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad/templates/tls.hcl.j2 (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad_lb/defaults/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad_lb/handlers/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad_lb/tasks/main.yaml (100%) rename shared/ansible/{ => hashicorp/nomad_bench}/roles/nomad_lb/templates/nginx.conf.j2 (100%) diff --git a/README.md b/README.md index 6d20b24..e230cb6 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ The [infra](./infra) directory contains code which manages and handles deployed and is partitioned by AWS region. ### Shared -The [shared](./shared) directory contains reusable Terraform modules, Ansible roles, and Nomad job -specifications. +The [shared](./shared) directory contains reusable Terraform modules, Ansible roles and collections, +and Nomad job specifications. ### Tools The [tools](./tools) directory hosts our custom written Go tools which are aimed at running and diff --git a/ansible.cfg b/ansible.cfg deleted file mode 100644 index 6ce3962..0000000 --- a/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[defaults] -roles_path=./shared/ansible/roles diff --git a/infra/eu-west-2/core/ansible/ansible.cfg b/infra/eu-west-2/core/ansible/ansible.cfg index eaeaaf7..bcc2050 100644 --- a/infra/eu-west-2/core/ansible/ansible.cfg +++ b/infra/eu-west-2/core/ansible/ansible.cfg @@ -1,3 +1,2 @@ [defaults] -roles_path=../../../../shared/ansible/roles inventory=inventory.yaml diff --git a/infra/eu-west-2/core/ansible/playbook_bastion.yaml b/infra/eu-west-2/core/ansible/playbook_bastion.yaml index 76bf80c..38dd93b 100644 --- a/infra/eu-west-2/core/ansible/playbook_bastion.yaml +++ b/infra/eu-west-2/core/ansible/playbook_bastion.yaml @@ -3,7 +3,7 @@ - hosts: bastion roles: - - role: common + - role: hashicorp.nomad_bench.common - role: gantsign.golang vars: @@ -11,7 +11,7 @@ golang_version: "1.21.7" golang_redis_sha256sum: "13b76a9b2a26823e53062fa841b07087d48ae2ef2936445dc34c4ae03293702c" - - role: influxdb_telegraf + - role: hashicorp.nomad_bench.influxdb_telegraf vars: influxdb_telegraf_input_nomad_enabled: false influxdb_telegraf_output_token: "{{ terraform_influxdb_token }}" @@ -20,6 +20,6 @@ # Hack to make the Terraform dynamic inventory plugin work with complex types. influxdb_telegraf_output_urls: "{{ terraform_influxdb_telegraf_output_urls_json | ansible.builtin.from_json }}" - - role: build + - role: hashicorp.nomad_bench.build vars: build_user: "{{ lookup('env', 'USER') }}" diff --git a/infra/eu-west-2/core/ansible/playbook_client.yaml b/infra/eu-west-2/core/ansible/playbook_client.yaml index 4ffbe96..2269de6 100644 --- a/infra/eu-west-2/core/ansible/playbook_client.yaml +++ b/infra/eu-west-2/core/ansible/playbook_client.yaml @@ -3,14 +3,14 @@ - hosts: client roles: - - role: common + - role: hashicorp.nomad_bench.common - - role: cni + - role: hashicorp.nomad_bench.cni - role: "geerlingguy.docker" become: true - - role: nomad + - role: hashicorp.nomad_bench.nomad vars: nomad_client_enabled: true nomad_server_join_retry_join: ["{{ terraform_nomad_server_join }}"] @@ -31,7 +31,7 @@ enabled: true nomad_acl_enabled: true - - role: influxdb_telegraf + - role: hashicorp.nomad_bench.influxdb_telegraf vars: influxdb_telegraf_input_nomad_url: "https://127.0.0.1:4646" influxdb_telegraf_input_nomad_tls_ca: "{{ nomad_config_dir }}tls/ca.pem" diff --git a/infra/eu-west-2/core/ansible/playbook_lb.yaml b/infra/eu-west-2/core/ansible/playbook_lb.yaml index 3037e0a..6b14e1b 100644 --- a/infra/eu-west-2/core/ansible/playbook_lb.yaml +++ b/infra/eu-west-2/core/ansible/playbook_lb.yaml @@ -3,9 +3,9 @@ - hosts: lb roles: - - role: common + - role: hashicorp.nomad_bench.common - - role: nomad_lb + - role: hashicorp.nomad_bench.nomad_lb vars: nomad_lb_ca_cert: "{{ lookup('file', '../tls/nomad-agent-ca.pem') }}" nomad_lb_tls_cert: "{{ lookup('file', '../tls/global-client-nomad.pem') }}" diff --git a/infra/eu-west-2/core/ansible/playbook_server.yaml b/infra/eu-west-2/core/ansible/playbook_server.yaml index 8ab0214..982b149 100644 --- a/infra/eu-west-2/core/ansible/playbook_server.yaml +++ b/infra/eu-west-2/core/ansible/playbook_server.yaml @@ -3,9 +3,9 @@ - hosts: server roles: - - role: common + - role: hashicorp.nomad_bench.common - - role: nomad + - role: hashicorp.nomad_bench.nomad vars: nomad_server_enabled: true nomad_server_bootstrap_expect: 3 @@ -21,7 +21,7 @@ nomad_cli_tls_cert_key: "{{ lookup('file', '../tls/global-cli-nomad-key.pem') }}" nomad_acl_enabled: true - - role: influxdb_telegraf + - role: hashicorp.nomad_bench.influxdb_telegraf vars: influxdb_telegraf_input_nomad_url: "https://127.0.0.1:4646" influxdb_telegraf_input_nomad_tls_ca: "{{ nomad_config_dir }}tls/ca.pem" diff --git a/infra/eu-west-2/test-cluster-template/ansible/ansible.cfg b/infra/eu-west-2/test-cluster-template/ansible/ansible.cfg index eaeaaf7..bcc2050 100644 --- a/infra/eu-west-2/test-cluster-template/ansible/ansible.cfg +++ b/infra/eu-west-2/test-cluster-template/ansible/ansible.cfg @@ -1,3 +1,2 @@ [defaults] -roles_path=../../../../shared/ansible/roles inventory=inventory.yaml diff --git a/infra/eu-west-2/test-cluster-template/ansible/playbook.yaml b/infra/eu-west-2/test-cluster-template/ansible/playbook.yaml index 8add941..d9c506f 100644 --- a/infra/eu-west-2/test-cluster-template/ansible/playbook.yaml +++ b/infra/eu-west-2/test-cluster-template/ansible/playbook.yaml @@ -3,7 +3,7 @@ - hosts: bastion roles: - - role: build + - role: hashicorp.nomad_bench.build vars: build_user: "{{ lookup('env', 'USER') }}" tags: @@ -12,8 +12,8 @@ - hosts: server roles: - - role: common - - role: nomad + - role: hashicorp.nomad_bench.common + - role: hashicorp.nomad_bench.nomad vars: # Most variables are defined in the inventory with Terraform. You can # customize values for specific hosts or groups using the files in @@ -23,7 +23,7 @@ # each host and group. nomad_server_join_retry_join: ["{{ terraform_nomad_server_join }}"] nomad_custom_binary_source: "{{ build_nomad_local_code_path }}/pkg/linux_amd64/nomad" - - role: influxdb_telegraf + - role: hashicorp.nomad_bench.influxdb_telegraf vars: influxdb_telegraf_input_nomad_url: "http://127.0.0.1:4646" influxdb_telegraf_output_urls: "{{ terraform_influxdb_telegraf_output_urls_json | ansible.builtin.from_json }}" diff --git a/shared/ansible/hashicorp/nomad_bench/galaxy.yml b/shared/ansible/hashicorp/nomad_bench/galaxy.yml new file mode 100644 index 0000000..2505433 --- /dev/null +++ b/shared/ansible/hashicorp/nomad_bench/galaxy.yml @@ -0,0 +1,8 @@ +namespace: "hashicorp" +name: "nomad_bench" +version: "0.0.1" +readme: "../../README.md" +authors: + - "HashiCorp" +description: "Nomad Bench Ansible Collection" +repository: "https://github.com/hashicorp-forge/nomad-bench" diff --git a/shared/ansible/hashicorp/nomad_bench/requirements.txt b/shared/ansible/hashicorp/nomad_bench/requirements.txt new file mode 100644 index 0000000..cfb6dc3 --- /dev/null +++ b/shared/ansible/hashicorp/nomad_bench/requirements.txt @@ -0,0 +1,11 @@ +ansible==9.2.0 +ansible-core==2.16.3 +cffi==1.16.0 +cryptography==42.0.2 +Jinja2==3.1.3 +jmespath==1.0.1 +MarkupSafe==2.1.4 +packaging==23.2 +pycparser==2.21 +PyYAML==6.0.1 +resolvelib==1.0.1 diff --git a/shared/ansible/hashicorp/nomad_bench/requirements.yaml b/shared/ansible/hashicorp/nomad_bench/requirements.yaml new file mode 100644 index 0000000..a2820ec --- /dev/null +++ b/shared/ansible/hashicorp/nomad_bench/requirements.yaml @@ -0,0 +1,12 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +roles: + - src: "geerlingguy.docker" + version: "7.1.0" + - src: "gantsign.golang" + version: "3.2.4" + +collections: + - name: "cloud.terraform" + version: "2.0.0" diff --git a/shared/ansible/roles/.gitignore b/shared/ansible/hashicorp/nomad_bench/roles/.gitignore similarity index 100% rename from shared/ansible/roles/.gitignore rename to shared/ansible/hashicorp/nomad_bench/roles/.gitignore diff --git a/shared/ansible/roles/build/defaults/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/build/defaults/main.yaml similarity index 100% rename from shared/ansible/roles/build/defaults/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/build/defaults/main.yaml diff --git a/shared/ansible/roles/build/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/build/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/build/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/build/tasks/main.yaml diff --git a/shared/ansible/roles/cni/defaults/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/cni/defaults/main.yaml similarity index 100% rename from shared/ansible/roles/cni/defaults/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/cni/defaults/main.yaml diff --git a/shared/ansible/roles/cni/tasks/install.yaml b/shared/ansible/hashicorp/nomad_bench/roles/cni/tasks/install.yaml similarity index 100% rename from shared/ansible/roles/cni/tasks/install.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/cni/tasks/install.yaml diff --git a/shared/ansible/roles/cni/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/cni/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/cni/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/cni/tasks/main.yaml diff --git a/shared/ansible/roles/common/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/common/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/common/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/common/tasks/main.yaml diff --git a/shared/ansible/roles/influxdb_telegraf/defaults/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/defaults/main.yaml similarity index 100% rename from shared/ansible/roles/influxdb_telegraf/defaults/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/defaults/main.yaml diff --git a/shared/ansible/roles/influxdb_telegraf/handlers/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/handlers/main.yaml similarity index 100% rename from shared/ansible/roles/influxdb_telegraf/handlers/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/handlers/main.yaml diff --git a/shared/ansible/roles/influxdb_telegraf/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/influxdb_telegraf/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/tasks/main.yaml diff --git a/shared/ansible/roles/influxdb_telegraf/templates/base.conf.j2 b/shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/templates/base.conf.j2 similarity index 100% rename from shared/ansible/roles/influxdb_telegraf/templates/base.conf.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/templates/base.conf.j2 diff --git a/shared/ansible/roles/influxdb_telegraf/templates/influxdb_telegraf.service.j2 b/shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/templates/influxdb_telegraf.service.j2 similarity index 100% rename from shared/ansible/roles/influxdb_telegraf/templates/influxdb_telegraf.service.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/influxdb_telegraf/templates/influxdb_telegraf.service.j2 diff --git a/shared/ansible/roles/nomad/defaults/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/defaults/main.yaml similarity index 100% rename from shared/ansible/roles/nomad/defaults/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/defaults/main.yaml diff --git a/shared/ansible/roles/nomad/files/anonymous.policy.hcl b/shared/ansible/hashicorp/nomad_bench/roles/nomad/files/anonymous.policy.hcl similarity index 100% rename from shared/ansible/roles/nomad/files/anonymous.policy.hcl rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/files/anonymous.policy.hcl diff --git a/shared/ansible/roles/nomad/handlers/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/handlers/main.yaml similarity index 100% rename from shared/ansible/roles/nomad/handlers/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/handlers/main.yaml diff --git a/shared/ansible/roles/nomad/tasks/acl_bootstrap.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/acl_bootstrap.yaml similarity index 100% rename from shared/ansible/roles/nomad/tasks/acl_bootstrap.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/acl_bootstrap.yaml diff --git a/shared/ansible/roles/nomad/tasks/host_volume.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/host_volume.yaml similarity index 100% rename from shared/ansible/roles/nomad/tasks/host_volume.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/host_volume.yaml diff --git a/shared/ansible/roles/nomad/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/nomad/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/main.yaml diff --git a/shared/ansible/roles/nomad/tasks/tls.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/tls.yaml similarity index 100% rename from shared/ansible/roles/nomad/tasks/tls.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/tasks/tls.yaml diff --git a/shared/ansible/roles/nomad/templates/base.hcl.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/base.hcl.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/base.hcl.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/base.hcl.j2 diff --git a/shared/ansible/roles/nomad/templates/client.hcl.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/client.hcl.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/client.hcl.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/client.hcl.j2 diff --git a/shared/ansible/roles/nomad/templates/host-volume.hcl.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/host-volume.hcl.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/host-volume.hcl.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/host-volume.hcl.j2 diff --git a/shared/ansible/roles/nomad/templates/nomad_profile.sh.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/nomad_profile.sh.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/nomad_profile.sh.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/nomad_profile.sh.j2 diff --git a/shared/ansible/roles/nomad/templates/server.hcl.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/server.hcl.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/server.hcl.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/server.hcl.j2 diff --git a/shared/ansible/roles/nomad/templates/tls.hcl.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/tls.hcl.j2 similarity index 100% rename from shared/ansible/roles/nomad/templates/tls.hcl.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad/templates/tls.hcl.j2 diff --git a/shared/ansible/roles/nomad_lb/defaults/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/defaults/main.yaml similarity index 100% rename from shared/ansible/roles/nomad_lb/defaults/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/defaults/main.yaml diff --git a/shared/ansible/roles/nomad_lb/handlers/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/handlers/main.yaml similarity index 100% rename from shared/ansible/roles/nomad_lb/handlers/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/handlers/main.yaml diff --git a/shared/ansible/roles/nomad_lb/tasks/main.yaml b/shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/tasks/main.yaml similarity index 100% rename from shared/ansible/roles/nomad_lb/tasks/main.yaml rename to shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/tasks/main.yaml diff --git a/shared/ansible/roles/nomad_lb/templates/nginx.conf.j2 b/shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/templates/nginx.conf.j2 similarity index 100% rename from shared/ansible/roles/nomad_lb/templates/nginx.conf.j2 rename to shared/ansible/hashicorp/nomad_bench/roles/nomad_lb/templates/nginx.conf.j2 diff --git a/shared/ansible/requirements.yaml b/shared/ansible/requirements.yaml index a2820ec..df91c9e 100644 --- a/shared/ansible/requirements.yaml +++ b/shared/ansible/requirements.yaml @@ -10,3 +10,6 @@ roles: collections: - name: "cloud.terraform" version: "2.0.0" + - name: "hashicorp.nomad_bench" + source: "shared/ansible/hashicorp/nomad_bench" + type: "dir" From 01242b31785929fa85c5dc5fd4031c62beb1cfda Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 23 May 2024 10:02:26 +0100 Subject: [PATCH 2/2] copywrite: add header to new file. --- shared/ansible/hashicorp/nomad_bench/galaxy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/ansible/hashicorp/nomad_bench/galaxy.yml b/shared/ansible/hashicorp/nomad_bench/galaxy.yml index 2505433..3b345c2 100644 --- a/shared/ansible/hashicorp/nomad_bench/galaxy.yml +++ b/shared/ansible/hashicorp/nomad_bench/galaxy.yml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + namespace: "hashicorp" name: "nomad_bench" version: "0.0.1"