Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Allow not installing Elasticsearch deb repository key #526

Merged
merged 1 commit into from
Jan 15, 2019
Merged

Allow not installing Elasticsearch deb repository key #526

merged 1 commit into from
Jan 15, 2019

Conversation

Fra-nk
Copy link

@Fra-nk Fra-nk commented Jan 14, 2019

If a variable is set in Ansible, there is no way to unset it ever again, i.e. setting es_apt_key: null or es_apt_key: ~ do not work.

Since this value is set in defaults/main.yml we have to perform a boolean check on the string.

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Crazybus
Crazybus previously approved these changes Jan 14, 2019
Copy link
Contributor

@Crazybus Crazybus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing this up!

@Crazybus
Copy link
Contributor

jenkins test this please

@Crazybus
Copy link
Contributor

10:44:56        TASK [elasticsearch : Debian - Add Elasticsearch repository key] ***************
10:44:56        fatal: [localhost]: FAILED! => {"msg": "The conditional check 'es_apt_key' failed. The error was: template error while templating string: expected token 'end of statement block', got '//'. String: {% if https://artifacts.elastic.co/GPG-KEY-elasticsearch %} True {% else %} False {% endif %}\n\nThe error appears to have been in '/tmp/kitchen/elasticsearch/tasks/elasticsearch-Debian.yml': line 41, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Debian - Add Elasticsearch repository key\n    ^ here\n"}

Is the failure that CI is giving. Was this working for you when you tested it? Wondering if this could be a difference between ansible versions. In any case I think it is going to need to be checking for a non-empty string.

Also the other GitHub status check is failing as you haven't signed the CLA

If a variable is set in Ansible, there is no way to unset
it ever again, i.e. 'null' or '~' do not work.
Since this value is set in defaults we have to check
for content instead of defined.
@Fra-nk
Copy link
Author

Fra-nk commented Jan 14, 2019

Ah, I only had tested with es_apt_key: "" since that's what we are using in our setup, but did not account for YAML string quoting shenanigans...

Validated it for the defaults now, too :).

Also the other GitHub status check is failing as you haven't signed the CLA

Waiting for my supervisor's approval to sign the CLA, but I've seen that, thanks :).

@Crazybus
Copy link
Contributor

jenkins test this please

Copy link
Contributor

@Crazybus Crazybus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Crazybus Crazybus merged commit dab8799 into elastic:master Jan 15, 2019
@Fra-nk Fra-nk deleted the upstream branch January 24, 2019 11:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants