Skip to content

Commit

Permalink
Merge pull request #83 from iisojunn/main
Browse files Browse the repository at this point in the history
enhancement: support ansible-vaulted basic auth passwords
  • Loading branch information
gardar authored Apr 12, 2023
2 parents 2a8bf16 + 9812360 commit 4501724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/mysqld_exporter/templates/web_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ http_server_config:
{% if mysqld_exporter_basic_auth_users | length > 0 %}
basic_auth_users:
{% for k, v in mysqld_exporter_basic_auth_users.items() %}
{{ k }}: {{ v | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
{{ k }}: {{ v | string | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
{% endfor %}
{% endif %}
2 changes: 1 addition & 1 deletion roles/node_exporter/templates/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ http_server_config:
{% if node_exporter_basic_auth_users | length > 0 %}
basic_auth_users:
{% for k, v in node_exporter_basic_auth_users.items() %}
{{ k }}: {{ v | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
{{ k }}: {{ v | string | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
{% endfor %}
{% endif %}

0 comments on commit 4501724

Please sign in to comment.