1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Give yarn its own role

This commit is contained in:
Mitra Ardron 2019-04-24 18:06:12 +10:00
parent f412e4bf7b
commit 5caf38ddc5
3 changed files with 37 additions and 18 deletions

View file

@ -1,2 +1,3 @@
dependencies:
- { role: nodejs, tags: ['nodejs'], when: internetarchive_install }
- { role: yarn, tags: ['yarn'], when: internetarchive_install }

View file

@ -12,24 +12,6 @@
- cmake
state: present
- name: Setup for yarn install from its own repo 1/2
command: sh -c 'curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -'
args:
chdir: "{{ iiab_base }}"
when: internet_available
- name: Setup for yarn install from its own repo 2/2
command: sh -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list'
args:
chdir: "{{ iiab_base }}"
when: internet_available
- name: Install yarn
package:
name:
- yarn
state: present
- name: Create directory {{ internetarchive_dir }}
file:
path: "{{ internetarchive_dir }}"
@ -42,6 +24,12 @@
chdir: "{{ internetarchive_dir }}"
when: internet_available
- name: Create directory /library/archiveorg
file:
path: "/library/archiveorg"
state: directory
owner: "root"
# CONFIG FILES
- name: "Install from templates: internetarchive.service (systemd), internetarchive.conf (Apache)"

View file

@ -0,0 +1,30 @@
---
- 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
mode: 0644
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
- name: "Yarn | Update APT cache"
apt:
update_cache: yes
- name: "Yarn | Uninstall"
package:
name: yarn
state: latest
when: internet_available and is_debuntu