Skip to content

Commit 809e2f8

Browse files
committed
Rename elasticsearch_url variable
The variable is not prefixed with the role name. In order to prevent name clashes it is renamed to zammad_elasticsearch_url.
1 parent 48fc65b commit 809e2f8

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

roles/zammad/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ configuring multiple domains or the redirection of outdated domains to the
119119
most recent one.
120120

121121
```yaml
122-
elasticsearch_url: "http://localhost:9200"
122+
zammad_elasticsearch_url: "http://localhost:9200"
123123
```
124124

125125
Elasticsearch server address.

roles/zammad/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ zammad_ssl_key_path: "/etc/ssl/private/zammad_key.pem"
1515
zammad_nginx_additional_server_configs: []
1616
zammad_nginx_server_tokens: "off"
1717

18-
elasticsearch_url: "http://localhost:9200"
18+
zammad_elasticsearch_url: "http://localhost:9200"
1919
...

roles/zammad/handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
- name: "Set Elasticsearch server address"
1313
ansible.builtin.command: >-
14-
zammad run rails r "Setting.set('es_url', '{{ elasticsearch_url | quote }}')"
14+
zammad run rails r "Setting.set('es_url', '{{ zammad_elasticsearch_url | quote }}')"
1515
changed_when: true
1616

1717
- name: "Build search index"

roles/zammad/tasks/install.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55

66
---
77

8+
- name: "Variable elasticsearch_url is deprecated"
9+
ansible.builtin.debug:
10+
msg:
11+
- "The variable elasticsearch_url is deprecated and will be removed in the next major release."
12+
- "Please use zammad_elasticsearch_url instead"
13+
when: "elasticsearch_url is defined and elasticsearch_url | length > 0"
14+
15+
- name: "Set variable zammad_elasticsearch_url for backwards compatibility"
16+
ansible.builtin.set_fact:
17+
zammad_elasticsearch_url: "{{ elasticsearch_url }}"
18+
when: "elasticsearch_url is defined and elasticsearch_url | length > 0"
19+
820
- name: "Configure Zammad repository for Centos-like"
921
when: "ansible_distribution | lower == 'centos'"
1022
block:

0 commit comments

Comments
 (0)