Skip to content

Commit

Permalink
fix(CI): specify more robust conditional on j2 template
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Sep 21, 2024
1 parent e3d0be4 commit e9e6c8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/vmagent/templates/vmagent.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ ExecStartPre={{ vmagent_bin }} \
ExecStart={{ vmagent_bin }} \
-promscrape.config=/etc/vmagent/vmagent.yml \
-remoteWrite.url={{ vmagent_remote_write_url }} \
{% if vmagent_remote_write_token_file -%}
{% if vmagent_remote_write_token_file is defined -%}
-remoteWrite.bearerTokenFile={{ vmagent_remote_write_token_file }} \
{% endif %}
{% if vmagent_basic_auth_username and vmagent_basic_auth_password -%}
{% if vmagent_basic_auth_username is defined and vmagent_basic_auth_password is defined -%}
-remoteWrite.basicAuth.username={{ vmagent_basic_auth_username }} \
-remoteWrite.basicAuth.passwordFile=/etc/vmagent/remote-url-password \
{% endif %}
Expand Down

0 comments on commit e9e6c8d

Please sign in to comment.