taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

main.yml (3163B)


      1 ---
      2 - name: Validate deployment variables
      3   ansible.builtin.assert:
      4     that:
      5       - ansible_facts["distribution"] in ["Debian", "Ubuntu"]
      6       - ansible_become | default(true) | bool
      7       - regional_currency_domain | length > 0
      8       - regional_currency_currency is match('^[A-Z]{3,11}$')
      9       - regional_currency_bank_admin_password | length > 0
     10       - not regional_currency_enable_tls or regional_currency_tls_email | length > 0
     11       - not regional_currency_enable_conversion or regional_currency_fiat_bank_name | length > 0
     12       - not regional_currency_enable_conversion or regional_currency_fiat_account_iban | length > 0
     13       - not regional_currency_enable_conversion or regional_currency_fiat_account_bic | length > 0
     14       - not regional_currency_enable_conversion or regional_currency_fiat_account_name | length > 0
     15       - not regional_currency_enable_telesign or regional_currency_telesign_auth_token | length > 0
     16       - not regional_currency_enable_nexus_services or regional_currency_enable_conversion
     17       - not regional_currency_conversion_test_mode or regional_currency_testing_deployment
     18       - not regional_currency_conversion_test_mode or regional_currency_enable_conversion
     19       - not regional_currency_conversion_test_mode or not regional_currency_enable_nexus_services
     20       - regional_currency_bank_token_rate is match('^[1-9][0-9]*r/[smh]$')
     21       - (regional_currency_bank_token_burst | int) > 0
     22       - regional_currency_bank_challenge_rate is match('^[1-9][0-9]*r/[smh]$')
     23       - (regional_currency_bank_challenge_burst | int) > 0
     24     fail_msg: The inventory is incomplete or contains invalid regional-currency variables.
     25 
     26 - name: Validate the deployment identity
     27   ansible.builtin.import_tasks: identity.yml
     28 
     29 - name: Install packages
     30   ansible.builtin.import_tasks: packages.yml
     31 
     32 - name: Adapt systemd units for Podman when requested
     33   ansible.builtin.import_tasks: container_systemd.yml
     34   when: regional_currency_podman_systemd_relax | bool
     35 
     36 - name: Configure nginx
     37   ansible.builtin.import_tasks: nginx.yml
     38 
     39 - name: Configure LibEuFin
     40   ansible.builtin.import_tasks: libeufin.yml
     41 
     42 - name: Configure the exchange
     43   ansible.builtin.import_tasks: exchange.yml
     44 
     45 - name: Configure the merchant backend
     46   ansible.builtin.import_tasks: merchant.yml
     47 
     48 - name: Record the successfully deployed identity
     49   ansible.builtin.copy:
     50     content: >-
     51       {{ {
     52            'currency': regional_currency_currency,
     53            'domain': regional_currency_domain,
     54            'conversion_enabled': regional_currency_enable_conversion,
     55            'fiat_currency': regional_currency_fiat_currency if regional_currency_enable_conversion else '',
     56            'fiat_account_iban': regional_currency_fiat_account_iban if regional_currency_enable_conversion else '',
     57            'fiat_account_bic': regional_currency_fiat_account_bic if regional_currency_enable_conversion else '',
     58            'fiat_account_name': regional_currency_fiat_account_name if regional_currency_enable_conversion else ''
     59          } | to_nice_json }}
     60     dest: "{{ regional_currency_state_directory }}/deployment-identity.json"
     61     owner: root
     62     group: root
     63     mode: "0600"