Commit f83495bf authored by Nikhil Doifode's avatar Nikhil Doifode
Browse files

Review comments

parent a7e98bfb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -11,3 +11,7 @@
[cluster:children]
master
worker

# AdvantEDGE development machine
[dev]
#dev1 ansible_host=<dev IP addr> ansible_user=<username>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
---

- hosts: cluster
- hosts: dev
  gather_facts: yes
  become: yes
  roles:
    - { role: golang, tags: golang }

- hosts: cluster
- hosts: dev
  gather_facts: yes
  become: yes
  roles:
+3 −1
Original line number Diff line number Diff line
@@ -13,7 +13,9 @@
  failed_when: "'command not found' in go_check.stdout"

- debug:
    msg: "[WARNING] Current golang version is lower than recommended version {{ go_version }}"
    msg: "[WARNING] Current golang version is lower than recommended version {{ go_version }}.\n
    To get the script to install properly, uninstall the existing golang and rerun script.\n
    Also remove all its dependencies and config/data."
  when: go_check.stdout != '' and go_check.stdout is version_compare(go_version, '<')

- name: Install golang if go command not found
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@

- name: Install node
  become: false
  shell: /bin/bash -c "source /home/{{ ansible_user }}/.nvm/nvm.sh && nvm ls-remote | grep 'Latest LTS'; nvm install {{ node_version }}"
  shell: /bin/bash -c "source /home/{{ ansible_user }}/.nvm/nvm.sh && nvm install {{ node_version }}"

- name: Install npm and eslint
  become: false
+7 −3
Original line number Diff line number Diff line
@@ -13,7 +13,9 @@
  failed_when: "'command not found' in node_check.stdout"

- debug:
    msg: "[WARNING] Current node version is lower than recommended version {{ node_version }}"
    msg: "[WARNING] Current node version is lower than recommended version {{ node_version }}.\n
    To get the script to install properly, uninstall the existing node and rerun script.\n
    Also remove the .nvm folder"
  when: node_check.stdout != '' and node_check.stdout is version_compare(node_version, '<')

- name: Check if npm is installed
@@ -22,10 +24,12 @@
  failed_when: "'command not found' in npm_check.stdout"

- debug:
    msg: "[WARNING] Current npm version is lower than recommended version {{ npm_version }}"
    msg: "[WARNING] Current npm version is lower than recommended version {{ npm_version }}.\n
    To get the script to install properly, uninstall the existing npm and rerun script.\n
    Also remove the .nvm folder"
  when: npm_check.stdout != '' and npm_check.stdout is version_compare(npm_version, '<')

- name: Install Node and NPM if node or npm command not found
  include_tasks:
    file: install.yml
  when: node_check.stdout == '' or npm_check.stdout == ''
  when: node_check.stdout == '' and npm_check.stdout == ''