From 6ef35dbd6cf0d42aa16b1236b299d54bba41b57c Mon Sep 17 00:00:00 2001 From: nagarjuna33 <115863146+nagarjuna33@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:34:28 +0530 Subject: [PATCH] Create springpet.yml --- springpet.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 springpet.yml diff --git a/springpet.yml b/springpet.yml new file mode 100644 index 000000000..9364e7ead --- /dev/null +++ b/springpet.yml @@ -0,0 +1,18 @@ +--- +- name: download and deploy spring-petclinic application + become: yes + hosts: all + tasks: + - name: to copy service file + ansible.builtin.copy: + src: /home/ubuntu/spring-petclinic-2.7.3.jar + dest: /usr/bin/java -jar spring-petclinic-2.7.3.jar + - name: to copy service file + ansible.builtin.copy: + src: /home/ubuntu/java_servicefile + dest: /etc/systemd/system/spring-petclinic.service + - name: start the service file + ansible.builtin.systemd: + state: restarted + daemon_reload: yes + name: spring-petclinic