From 2f587ccfe1fc08fa168e6e38c5a76ad16c4f5e4b Mon Sep 17 00:00:00 2001 From: acichon Date: Fri, 5 Apr 2024 19:26:20 +0200 Subject: [PATCH] workaround for hyphens --- playbooks/azure_sdwan_config.yml | 4 ++-- roles/azure_controllers/tasks/main.yml | 4 ++++ roles/azure_edges/tasks/main.yml | 4 ++++ roles/azure_network_infrastructure/tasks/main.yml | 4 ++++ roles/azure_teardown/tasks/main.yml | 4 ++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/playbooks/azure_sdwan_config.yml b/playbooks/azure_sdwan_config.yml index 702353f..6f01f87 100644 --- a/playbooks/azure_sdwan_config.yml +++ b/playbooks/azure_sdwan_config.yml @@ -16,10 +16,10 @@ az_resources_prefix: "{{ organization_name }}" # example configuration is: -# aws_allowed_subnets: +# az_allowed_subnets: # - 15.15.0.0/16 # - 10.10.0.0/16 -aws_allowed_subnets: null +az_allowed_subnets: null ############################### diff --git a/roles/azure_controllers/tasks/main.yml b/roles/azure_controllers/tasks/main.yml index bd48d6f..1c81036 100644 --- a/roles/azure_controllers/tasks/main.yml +++ b/roles/azure_controllers/tasks/main.yml @@ -23,6 +23,10 @@ loop_var: instance_item label: "{{ instance_item.hostname }}" +- name: "Replace underscores with hyphens in the az_resources_prefix string" + ansible.builtin.set_fact: + az_resources_prefix: "{{ az_resources_prefix | replace('_', '-') }}" + - name: "Prepare directory for results, path: {{ results_dir }}" ansible.builtin.file: path: "{{ results_dir }}" diff --git a/roles/azure_edges/tasks/main.yml b/roles/azure_edges/tasks/main.yml index f5f9ed7..015c307 100644 --- a/roles/azure_edges/tasks/main.yml +++ b/roles/azure_edges/tasks/main.yml @@ -23,6 +23,10 @@ tasks_from: aws_required_variables defaults_from: az_required_vars_edges.yml +- name: "Replace underscores with hyphens in the az_resources_prefix string" + ansible.builtin.set_fact: + az_resources_prefix: "{{ az_resources_prefix | replace('_', '-') }}" + - name: "Prepare directory for results, path: {{ results_dir }}" ansible.builtin.file: path: "{{ results_dir }}" diff --git a/roles/azure_network_infrastructure/tasks/main.yml b/roles/azure_network_infrastructure/tasks/main.yml index 1672bd6..cdae880 100644 --- a/roles/azure_network_infrastructure/tasks/main.yml +++ b/roles/azure_network_infrastructure/tasks/main.yml @@ -12,6 +12,10 @@ tasks_from: required_variables defaults_from: az_required_vars_network_infrastructure.yml +- name: "Replace underscores with hyphens in the az_resources_prefix string" + ansible.builtin.set_fact: + az_resources_prefix: "{{ az_resources_prefix | replace('_', '-') }}" + - name: "Prepare directory for results, path: {{ results_dir }}" ansible.builtin.file: path: "{{ results_dir }}" diff --git a/roles/azure_teardown/tasks/main.yml b/roles/azure_teardown/tasks/main.yml index bcf20a2..96c1529 100644 --- a/roles/azure_teardown/tasks/main.yml +++ b/roles/azure_teardown/tasks/main.yml @@ -6,5 +6,9 @@ name: common tasks_from: az_user_session_probe +- name: "Replace underscores with hyphens in the az_resources_prefix string" + ansible.builtin.set_fact: + az_resources_prefix: "{{ az_resources_prefix | replace('_', '-') }}" + - name: Remove Azure Resource Group and wait for teardown completion ansible.builtin.include_tasks: az_teardown_rg.yml