-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallnodejs.yml
More file actions
30 lines (28 loc) · 1.13 KB
/
installnodejs.yml
File metadata and controls
30 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- hosts: all
remote_user: nextag
tasks:
- name: Checking if build is already present
stat:
path: /home/nextag/deploy/ps-node/ps-node.{{ build_no }}
register: build_directory
- name: Creating new build directory
file: path=/home/nextag/deploy/ps-node/ps-node.{{ build_no }} state=directory
- name: Downloading the build tar
get_url: url=http://172.16.12.15/repo/components/ps-node/builds/ps-node.{{ build_no }}.tar.gz dest=/tmp
when: build_directory.stat.exists == False
- name: Untar the build
unarchive: src=/tmp/ps-node.{{ build_no }}.tar.gz dest=/home/nextag/deploy/ps-node/ps-node.{{ build_no }} remote_src=yes
when: build_directory.stat.exists == False
- name: Webstopping
command: webstop
- name: Removing Existing softllink
command: rm -rf /home/nextag/live
when: build_directory.stat.exists == False
- name: creating new live link
command: ln -s /home/nextag/deploy/ps-node/ps-node.{{ build_no }} live
when: build_directory.stat.exists == False
- name: Webstarting
command: webstart
register: command_result
failed_when: "'Error' in command_result.stderr"