-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust role for buliding AMIs with Packer #18
base: master
Are you sure you want to change the base?
Conversation
@@ -17,3 +17,12 @@ | |||
state: present | |||
notify: | |||
- restart filebeat | |||
|
|||
- name: modify filebeat service file to include environment variables |
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.
This would probably make sense as a drop-in unit instead of modifying the unit directly: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Description
Along with a unit file foo.service, a "drop-in" directory foo.service.d/ may exist. All files with the suffix ".conf" from this directory will be parsed after the unit file itself is parsed. This is useful to alter or add configuration settings for a unit, without having to modify unit files.
Hi,
I've added a little switch I use often in Ansible for building AMI packages in AWS using Packer tool.
The thing is that while building we don't want to start the services, because they are often in unconfigured state, so setting start_services to false prevents that.
The default behaviour is unchanged, so running playbook with this role installs and starts filebeat.
The other thing I've added (only for RedHat, as I know how to do it in RH) is the environment file reference for systemd file - this is to be used in templates, where you can use env variables for dynamic configuration of filebeat.
Best regards
Łukasz Tomaszkiewicz