ansible-taler-exchange

Ansible playbook to deploy a production Taler Exchange
Log | Files | Refs | README | LICENSE

health.yml (852B)


      1 ---
      2 # regional-currency: curl /config and /keys
      3 
      4 - name: Wait for local exchange /config
      5   ansible.builtin.uri:
      6     url: "http://127.0.0.1:{{ EXCHANGE_HTTP_PORT | default(9011) }}/config"
      7     status_code: 200
      8   register: cfg
      9   retries: 30
     10   delay: 2
     11   until: cfg is succeeded and cfg.status == 200
     12 
     13 - name: Wait for local exchange /keys
     14   ansible.builtin.uri:
     15     url: "http://127.0.0.1:{{ EXCHANGE_HTTP_PORT | default(9011) }}/keys"
     16     status_code: 200
     17   register: keys
     18   retries: 60
     19   delay: 2
     20   until: keys is succeeded and keys.status == 200
     21   failed_when: false
     22 
     23 - name: Report health
     24   ansible.builtin.debug:
     25     msg: >-
     26       /config={{ cfg.status }}
     27       currency={{ cfg.json.currency | default('?') }}
     28       /keys={{ keys.status | default('n/a') }}
     29       systemd=yes
     30       account={{ exchange_account_id }}
     31       do_offline={{ do_offline }}