diff --git a/roles/elasticstack/defaults/main.yml b/roles/elasticstack/defaults/main.yml index ee14ca30..5eb2b88d 100644 --- a/roles/elasticstack/defaults/main.yml +++ b/roles/elasticstack/defaults/main.yml @@ -19,6 +19,7 @@ elasticstack_initial_passwords: /usr/share/elasticsearch/initial_passwords elasticstack_kibana_port: 5601 elasticstack_override_beats_tls: false elasticstack_release: 8 +elasticstack_repo_url: https://artifacts.elastic.co/packages elasticstack_repo_key: https://artifacts.elastic.co/GPG-KEY-elasticsearch elasticstack_rpm_workaround: false elasticstack_security: true diff --git a/roles/repos/tasks/debian.yml b/roles/repos/tasks/debian.yml index a25effbb..1f3ba3f3 100644 --- a/roles/repos/tasks/debian.yml +++ b/roles/repos/tasks/debian.yml @@ -29,14 +29,14 @@ - name: Ensure Elastic Stack apt repository is configured (Debian) ansible.builtin.apt_repository: - repo: deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/apt stable main + repo: deb [signed-by=/usr/share/keyrings/elasticsearch.asc] {{ elasticstack_repo_url }}/{{ elasticstack_release }}.x/apt stable main state: present filename: elasticstack when: elasticstack_variant == "elastic" - name: Ensure Elastic Stack OSS apt repository is configured (Debian) ansible.builtin.apt_repository: - repo: deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/apt stable main + repo: deb [signed-by=/usr/share/keyrings/elasticsearch.asc] {{ elasticstack_repo_url }}/oss-{{ elasticstack_release }}.x/apt stable main state: present filename: elasticstack when: elasticstack_variant == "oss" diff --git a/roles/repos/tasks/redhat.yml b/roles/repos/tasks/redhat.yml index 01388e8d..a873b687 100644 --- a/roles/repos/tasks/redhat.yml +++ b/roles/repos/tasks/redhat.yml @@ -44,7 +44,7 @@ name: elastic-{{ elasticstack_release }}.x description: Elastic Release {{ elasticstack_release }}.x file: elastic-release - baseurl: https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/yum + baseurl: "{{ elasticstack_repo_url }}/{{ elasticstack_release }}.x/yum" gpgcheck: yes gpgkey: "{{ elasticstack_repo_key }}" enabled: "{{ elasticstack_enable_repos | bool }}" @@ -55,7 +55,7 @@ name: elastic-oss-{{ elasticstack_release }}.x description: Elastic OSS Release {{ elasticstack_release }}.x file: elastic-oss-release - baseurl: https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/yum + baseurl: "{{ elasticstack_repo_url }}/oss-{{ elasticstack_release }}.x/yum" gpgcheck: yes gpgkey: "{{ elasticstack_repo_key }}" enabled: "{{ elasticstack_enable_repos | bool }}" diff --git a/roles/repos/tasks/suse.yml b/roles/repos/tasks/suse.yml index ae9d1ead..1aca81ad 100644 --- a/roles/repos/tasks/suse.yml +++ b/roles/repos/tasks/suse.yml @@ -9,7 +9,7 @@ community.general.zypper_repository: name: elastic-{{ elasticstack_release }}.x description: Elastic Release {{ elasticstack_release }}.x - repo: https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/yum + repo: "{{ elasticstack_repo_url }}/{{ elasticstack_release }}.x/yum" auto_import_keys: true enabled: "{{ elasticstack_enable_repos | bool }}" when: elasticstack_variant == "elastic" @@ -18,7 +18,7 @@ community.general.zypper_repository: name: elastic-oss-{{ elasticstack_release }}.x description: Elastic OSS Release {{ elasticstack_release }}.x - repo: https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/yum + repo: "{{ elasticstack_repo_url }}/oss-{{ elasticstack_release }}.x/yum" auto_import_keys: true enabled: "{{ elasticstack_enable_repos | bool }}" when: elasticstack_variant == "oss"