SHARE
TWEET

ansible

a guest Nov 19th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - name: Setting Up Node Server
  2.   gather_facts: true
  3.   hosts: localhost
  4.   tasks:
  5.     - name: Upgrade all packages to latest version
  6.       apt:
  7.         upgrade: dist
  8.     - name: Install curl
  9.       apt:
  10.         name: curl
  11.         state: latest
  12.  
  13.     # Install and setup nginx.
  14.     - name: Install nginx
  15.       apt:
  16.         name: nginx
  17.         state: latest
  18.     - name: Setup nginx
  19.       copy:
  20.  
  21.     - name: Install nvm
  22.       shell: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
  23.       args:
  24.         executable: /bin/bash
  25.         chdir: "{{ ansible_env.HOME }}"
  26.         creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
  27.     - name: Install Node v12
  28.       shell: >
  29.         . {{ ansible_env.HOME }}/.nvm/nvm.sh && nvm install 12 && nvm use 12
  30.       args:
  31.         executable: /bin/bash
  32.         chdir: "{{ ansible_env.HOME }}"
  33.         creates: "{{ ansible_env.HOME }}/.nvm/versions/{{ item }}"
  34.       loop:
  35.         - node
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top