Skip to content

Commit

Permalink
Merge pull request #1506 from guardian/an/cdk-base-delay-fluentbit-start
Browse files Browse the repository at this point in the history
cdk-base: Add option to not automatically start fluentbit
  • Loading branch information
andrew-nowak authored Aug 1, 2024
2 parents bf22e38 + 862c22b commit 72c6e69
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions roles/cdk-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,14 @@ Resources:
_While not required, it is strongly recommended to [enable tag metadata on your
instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-metadataoptions.html#cfn-ec2-launchtemplate-launchtemplatedata-metadataoptions-instancemetadatatags)
as this allows tag lookup without requiring remote AWS API calls at runtime._

## Options

- `start_fluentbit`: boolean, default `true`

Set this to `false` if you do not want log shipping to start automatically.
This is useful if you will add or change the log shipping config supplied by
`devx-logs`. If you have set this to `false` you are now responsible for
starting `td-agent-bit.service` in your user data script
(by running `systemctl start td-agent-bit.service` after all config files
have been created), and if you fail to do so logs will not be shipped.
3 changes: 2 additions & 1 deletion roles/cdk-base/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
dist_bucket: amigo-data
dist_bucket: amigo-data
start_fluentbit: true
1 change: 1 addition & 0 deletions roles/cdk-base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
chmod +x /var/lib/cloud/scripts/per-instance/02-$NAME
when:
- ansible_os_family == "Debian"
- start_fluentbit

- name: Remove syslog output
shell: |
Expand Down

0 comments on commit 72c6e69

Please sign in to comment.