diff --git a/tasks/embedded/standalone.yml b/tasks/embedded/standalone.yml index c3a7168..a598502 100644 --- a/tasks/embedded/standalone.yml +++ b/tasks/embedded/standalone.yml @@ -16,31 +16,9 @@ # You should have received a copy of the GNU General Public License # along with ARA. If not, see . -- name: Get the location of ara-manage - command: which ara-manage - environment: - PATH: "{{ path_with_virtualenv | default(omit) }}" - register: ara_manage - changed_when: false - -- name: Copy systemd service template - become: true - template: - src: templates/ara_service.conf.j2 - dest: /etc/systemd/system/ara.service - owner: root - group: root - mode: 0644 - notify: - - reload systemctl daemon - - restart ara - -- name: Flush handlers - meta: flush_handlers - - name: Ensure the embedded server service is started and enabled become: true - systemd: + service: name: ara state: started enabled: yes diff --git a/tasks/main.yml b/tasks/main.yml index f940d57..c827670 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -59,6 +59,28 @@ src: logrotate.conf.j2 dest: /etc/logrotate.d/ara +- name: Get the location of ara-manage + command: which ara-manage + environment: + PATH: "{{ path_with_virtualenv | default(omit) }}" + register: ara_manage + changed_when: false + +- name: Copy systemd service template + become: true + template: + src: templates/ara_service.conf.j2 + dest: /etc/systemd/system/ara.service + owner: root + group: root + mode: 0644 + notify: + - reload systemctl daemon + - restart ara + +- name: Flush handlers + meta: flush_handlers + - name: Include web server configuration include_tasks: "{{ ara.deployment.server }}/{{ ara.deployment.type }}.yml"