45 lines
967 B
YAML
45 lines
967 B
YAML
---
|
|
# For NodeJS package
|
|
- name: Configure NodeJS pin
|
|
when:
|
|
- ansible_distribution == 'Debian'
|
|
- ansible_distribution_release == 'stretch'
|
|
template:
|
|
src: apt/nodejs.j2
|
|
dest: /etc/apt/preferences.d/nodejs
|
|
mode: 0644
|
|
|
|
# For HTTPS apt
|
|
- name: Install HTTPS apt
|
|
apt:
|
|
name: apt-transport-https
|
|
update_cache: true
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Configure the apt key
|
|
apt_key:
|
|
url: https://dl.yarnpkg.com/debian/pubkey.gpg
|
|
id: 1646B01B86E50310
|
|
register: apt_key_result
|
|
retries: 3
|
|
until: apt_key_result is succeeded
|
|
|
|
- name: Configure Yarn repository
|
|
apt_repository:
|
|
repo: "deb https://dl.yarnpkg.com/debian/ stable main"
|
|
|
|
# Install CodiMD dependencies
|
|
- name: Install required packages
|
|
apt:
|
|
name:
|
|
- git
|
|
- nodejs
|
|
- npm
|
|
- build-essential
|
|
- yarn
|
|
update_cache: true
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|