概要
Amazon Linux 2 に Node + yarn をインストールする時のメモ
yum でさっとは入らない、よく忘れるのでメモ
- name: download nvm installer
become: no
get_url: url=https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh dest=/tmp/nvm-installer.sh
- name: execute the nvm-installer.sh
become: yes
shell: sh /tmp/nvm-installer.sh
- name: Add nvm initialization to profile
become: yes
template: src=nvm.sh.j2 dest=/etc/profile.d/nvm.sh
- name: install node
become: no
shell: source /etc/profile && nvm install --lts
- name: use node
become: no
shell: source /etc/profile && nvm use --lts
- name: download yarn installer
become: no
get_url: url=https://yarnpkg.com/install.sh dest=/tmp/yarn-installer.sh
- name: execute the yarn-installer.sh
become: no
shell: sh /tmp/yarn-installer.sh