1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/yarn/tasks/main.yml

42 lines
998 B
YAML
Raw Normal View History

2019-04-24 08:06:12 +00:00
- name: "Yarn | GPG"
apt_key:
url: https://dl.yarnpkg.com/debian/pubkey.gpg
state: present
- name: "Yarn | Ensure Debian sources list file exists"
file:
path: /etc/apt/sources.list.d/yarn.list
owner: root
2020-01-30 09:00:00 +00:00
mode: '0644'
2019-04-24 08:06:12 +00:00
state: touch
- name: "Yarn | Ensure Debian package is in sources list"
lineinfile:
dest: /etc/apt/sources.list.d/yarn.list
regexp: 'deb http://dl.yarnpkg.com/debian/ stable main'
line: 'deb http://dl.yarnpkg.com/debian/ stable main'
state: present
2020-01-30 09:00:00 +00:00
- name: "Yarn | Update APT cache"
apt:
2019-08-13 22:55:21 +00:00
update_cache: yes
2019-04-24 22:19:34 +00:00
- name: "Yarn | Install"
2019-04-24 08:06:12 +00:00
package:
name: yarn
state: latest
2019-05-06 03:08:09 +00:00
when: internet_available and is_debuntu
2020-01-30 09:00:00 +00:00
# RECORD Yarn AS INSTALLED
- name: "Set 'yarn_installed: True'"
set_fact:
yarn_installed: True
- name: "Add 'yarn_installed: True' to {{ iiab_state_file }}"
lineinfile:
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
regexp: '^yarn_installed'
line: 'yarn_installed: True'