1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 # Install the RailsAPI server and configure it to match the cluster
8 - name: apt update if needed
9 ansible.builtin.meta: flush_handlers
11 - name: Install arvados-api-server
16 register: arvados_api_server_apt
18 - name: Create arvados-railsapi.service.d
21 path: /etc/systemd/system/arvados-railsapi.service.d
27 - name: Write cluster configuration to arvados-railsapi.service override
29 ansible.builtin.template:
31 dest: "/etc/systemd/system/arvados-railsapi.service.d/ansible-{{ arvados_cluster_id }}.conf"
35 register: arvados_api_server_override
37 - name: Start and enable arvados-railsapi.service
40 arvados_api_server_changed: "{{ arvados_api_server_apt.changed or arvados_api_server_override.changed or arvados_config_changed }}"
41 ansible.builtin.systemd_service:
42 name: arvados-railsapi.service
43 daemon_reload: "{{ arvados_api_server_changed }}"
44 state: "{{ 'restarted' if arvados_api_server_changed else 'started' }}"