diff --git a/ansible/roles/cyborg/tasks/config.yml b/ansible/roles/cyborg/tasks/config.yml index b1a8cc0840..5ca3007988 100644 --- a/ansible/roles/cyborg/tasks/config.yml +++ b/ansible/roles/cyborg/tasks/config.yml @@ -82,28 +82,18 @@ notify: - Restart {{ item.key }} container -- name: Checking whether cyborg-api-paste.ini file exists - vars: - service: "{{ cyborg_services['cyborg-api'] }}" - stat: - path: "{{ node_custom_config }}/cyborg/cyborg-api-paste.ini" - delegate_to: localhost - run_once: True - register: check_cyborg_api_paste_ini - when: - - service.enabled | bool - - name: Copying over cyborg-api-paste.ini vars: service: "{{ cyborg_services['cyborg-api'] }}" - template: - src: "{{ node_custom_config }}/cyborg/cyborg-api-paste.ini" + merge_configs: + sources: + - "{{ role_path }}/templates/cyborg-api-paste.ini.j2" + - "{{ node_custom_config }}/cyborg/cyborg-api-paste.ini" dest: "{{ node_config_directory }}/cyborg-api/api-paste.ini" mode: "0660" when: - inventory_hostname in groups['cyborg-api'] - service.enabled | bool - - check_cyborg_api_paste_ini.stat.exists notify: - Restart cyborg-api container diff --git a/releasenotes/notes/fix-cyborg-api-failed-to-find-api-paste-file-225cec3ec16b2265.yaml b/releasenotes/notes/fix-cyborg-api-failed-to-find-api-paste-file-225cec3ec16b2265.yaml new file mode 100644 index 0000000000..00d34fc1c5 --- /dev/null +++ b/releasenotes/notes/fix-cyborg-api-failed-to-find-api-paste-file-225cec3ec16b2265.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix cyborg api container failed to load api paste file. For details + please see `bug 1874028 + `__.