main.yml (1857B)
1 --- 2 - name: Refresh systemd after all package and unit changes 3 ansible.builtin.systemd: 4 daemon_reload: true 5 6 - name: Start the configured application units 7 ansible.builtin.systemd: 8 name: "{{ item.unit }}" 9 state: started 10 enabled: true 11 loop: 12 - { unit: libeufin-nexus-httpd.service, wanted: true } 13 - { unit: libeufin-nexus.target, wanted: "{{ use_ebics | bool }}" } 14 - { unit: sms-challenger-httpd.service, wanted: "{{ deploy_challenger | bool }}" } 15 - { unit: email-challenger-httpd.service, wanted: "{{ deploy_challenger | bool }}" } 16 - { unit: postal-challenger-httpd.service, wanted: "{{ deploy_challenger | bool }}" } 17 - { unit: taler-exchange.target, wanted: true } 18 - { unit: taler-auditor.target, wanted: "{{ deploy_auditor | bool }}" } 19 - { unit: taler-exchange-sanctionscheck.service, wanted: "{{ sanction_list is defined }}" } 20 loop_control: 21 label: "{{ item.unit }}" 22 when: item.wanted | bool 23 24 - name: Keep automatic bank communication disabled in manual mode 25 ansible.builtin.systemd: 26 name: libeufin-nexus.target 27 enabled: false 28 when: not (use_ebics | bool) 29 30 - name: Restore previously active optional units and activation sources 31 ansible.builtin.systemd: 32 name: "{{ item }}" 33 state: started 34 loop: "{{ deployment_previously_active_units | default([]) }}" 35 vars: 36 restore_auditor_unit: >- 37 {{ not (deploy_auditor | bool) 38 and item is match('^taler-(helper-)?auditor') }} 39 restore_challenger_unit: >- 40 {{ not (deploy_challenger | bool) 41 and item is match('^((sms|email|postal)-)?challenger-httpd') }} 42 restore_activation_source: >- 43 {{ item is search('[.](timer|socket)$') 44 and ((use_ebics | bool) or item is not match('^libeufin-nexus')) }} 45 when: restore_auditor_unit or restore_challenger_unit or restore_activation_source