feat(monitoring): sync grafana admin password from infisical via stdin
ansible-core-mon / deploy (push) Successful in 7s
ansible-core-mon / deploy (push) Successful in 7s
This commit is contained in:
1 parent
0205a5502a
commit
3670bb6033
1 file changed
+17
@@ -63,3 +63,20 @@
|
|||||||
register: compose_up
|
register: compose_up
|
||||||
changed_when: "'Started' in compose_up.stderr or 'Created' in compose_up.stderr or 'Recreated' in compose_up.stderr or 'Pulled' in compose_up.stderr"
|
changed_when: "'Started' in compose_up.stderr or 'Created' in compose_up.stderr or 'Recreated' in compose_up.stderr or 'Pulled' in compose_up.stderr"
|
||||||
|
|
||||||
|
- name: Дождаться готовности Grafana
|
||||||
|
ansible.builtin.uri:
|
||||||
|
url: "http://127.0.0.1:3000/api/health"
|
||||||
|
status_code: 200
|
||||||
|
register: grafana_health
|
||||||
|
retries: 20
|
||||||
|
delay: 2
|
||||||
|
until: grafana_health.status == 200
|
||||||
|
|
||||||
|
- name: Синхронизировать пароль администратора Grafana с Infisical
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: docker exec -i monitoring-grafana grafana cli admin reset-admin-password --password-from-stdin
|
||||||
|
stdin: "{{ grafana_admin_password }}"
|
||||||
|
no_log: true
|
||||||
|
changed_when: false
|
||||||
|
when: grafana_admin_password is defined and grafana_admin_password | length > 0
|
||||||
|
|
||||||
Reference in new issue
Block a user