Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
- hosts: test-servers
become: yes
become_user: root
- name: Check whether the executable file exists or not
path: /home/ec2-user/assignment-1.0-SNAPSHOT
register: stat_result
- name: "Unzip module"
unarchive: src=/home/knoldus/play/target/universal/ dest=/home/ec2-user
when: stat_result.stat.exists == False
- name: "Deploy website"
action: "shell sh /home/ec2-user/assignment-1.0-SNAPSHOT/bin/assignment >> /dev/null &"
async: 60
poll: 0
when: stat_result.stat.exists == False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment