-
Notifications
You must be signed in to change notification settings - Fork 855
Fixes bug #326 and adds the option to configure mail #445
Conversation
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? |
jenkins please test this |
jenkins test this please |
Thanks for this PR @gekkeharry13. The build is currently failing with
which is a variable you've added. You'll need to add a default value in defaults/main.yml so this works for those who aren't using a custom setting. The |
Updated configuration template with if statements for optional features
Good points! Added the documentation and made path_repo an if statement so it is optional (as it is not always used) |
jenkins test this please |
This is looking great @gekkeharry13. Could you add a default value for |
Hi itsmed, the path.repo value is not a default one (https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html). I think that this value should always be set manually as you must be aware of where your snapshots are stored. If not you could corrupt your filesystem if it runs out of space. |
@gekkeharry13 sorry, I can't read, or type :)
You addressed the concern I meant to bring up, so jenkins magic time. jenkins test this |
Hey @gekkeharry13 we're still seeing build failures with
|
hmm sorry about that. Still getting used to ansible and jinja. Had to use "{% if es_path_repo is defined %}" instead of {% if es_path_repo %}. I have now verified it on my local machine, there it worked without the variable available. So hopefully jenkins likes the new master.... |
no worries, my apologies. I got distracted and didn't finish the suggestion. Great to hear you have it working locally, let's run the build! jenkins test this |
@gekkeharry13 this is looking close. We'll need to set a default value for From the most recent build:
|
Hi itsmed, I have adjusted the name to match the standard (es_action_auto_create_index). As far as I can see here "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html". The default value should be true, so added that to the defaults/main.yml |
Added documentation for es_action_auto_create_index and fixed the order
@itsmed Was testing a bit with all settings and came across the fact that it es_action_auto_create_index should also be able to be set as an array with allowed indices, so adjusted the code accordingly. It was a bit of a hassle working it out, but it should work properly now! |
hmm woopsie... My git skills are lacking pretty bad... Just pushed a set of commits to master while I was just trying to sync my local repo with the current master. I will try to figure out how to reverse things |
maybe you can also review the code and provide feedback on if you like it to be pushed to your repo? I can imagine that SSL configuration might be a valuable addition, but for now it might be a bit too specific to my environment. If you can help me fix that I can make it available to you guys |
Let's see what the tests say first, then regarding the |
I think for simplicity's sake @gekkeharry13 you should |
Okee, I think we are back were we were... My history is a mess now, but ah well. PS is there a way to get in touch privately. I also am building Logstash and Kibana templates, which I am willing to share |
If you can send a link I'd be happy to help evaluate the kibana/logstash playbooks. In general we prefer to keep communication public to allow others to participate in the conversation, and it encourages accountability. |
jenkins test this |
Kibana is located here: https://github.com/gekkeharry13/ansible-kibana. Logstash will be uploaded shortly after. They are currently a bit focused on my personal build, but when that part is over I will make them as generic as possible |
It looks like |
it is back now, missed that part I guess |
jenkins test this |
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? |
Sorry for the delay here @gekkeharry13. A change was made that may help ensure that the tests aren't transient failures, so I'm going to use the "update branch" button and re-run the tests to see if that helps. The last check had failed with |
jenkins test this |
Default value is es_action_auto_create_index: true
Awh man, I am sorry I messed up my repo this bad.... I managed to work in a seperate branch with my new changes now, so it no longer interferes. I have added es_action_auto_create_index: true back to my defaults/main.yml. I checked the repo and there are only references to "es_action_auto_create_index" not to "action_auto_create_index" |
No worries at all! Your contributions are much appreciated :) If you want to push the new changes to this branch ( and |
jenkins test this |
I think we're super close now @gekkeharry13 This time the build failed because
|
first check is es_mail_config is defined
I have updated the es_mail_config statement again :) |
jenkins test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks so much @gekkeharry13 for iterating on this!
templates/elasticsearch.yml.j2
Outdated
@@ -23,6 +23,10 @@ path.data: {{ data_dirs | array_to_str }} | |||
|
|||
path.logs: {{ log_dir }} | |||
|
|||
path.repo: {{ path_repo }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path_repo
will need a default value set in default/main.yml
templates/elasticsearch.yml.j2
Outdated
@@ -23,6 +23,10 @@ path.data: {{ data_dirs | array_to_str }} | |||
|
|||
path.logs: {{ log_dir }} | |||
|
|||
path.repo: {{ path_repo }} | |||
|
|||
action.auto_create_index: {{ action_auto_create_index }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I anticipate that this will need a default value set as well
templates/elasticsearch.yml.j2
Outdated
@@ -44,3 +56,21 @@ xpack.ml.enabled: false | |||
xpack.graph.enabled: false | |||
{% endif %} | |||
{% endif %} | |||
|
|||
{% if es_mail_config['account'] is defined %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most recent failure "AnsibleUndefinedVariable: 'es_mail_config' is undefined"
So I think we'll need to check for both es_mail_config and es_mail_config['account']
.
Does that seem like the right way to go about it to you @gekkeharry13 ?
So everything is fine now? I am currently actively developing the following Ansible repo's:
They are currently working for (as I do not have much customisation to paths and such), if you like we can discuss if there is a way to provide them in a decent fashion to Elastic in order for other customers to use. |
Yes the PR has been merged. We do have plans to provide playbooks for our other products, so thanks for offering these up @gekkeharry13! We'll take a look at your playbooks here and assess how to move forward. |
Okay great! Let me know if you need something from me! |
Fixes #326
Added code to allow the configuration of x-pack notifications through mail.
Apparently a syntax error in parenthesis is also fixed, but can't remember I did that.