ansible/roles/codimd/tasks/main.yml
Alexandre Iooss a316a5d461 Fix main.yml
2019-02-09 08:07:10 +01:00

51 lines
1.1 KiB
YAML

---
# Install APT dependencies
- include_tasks: 0_apt_dependencies.yml
# Create CodiMD user and group
- include_tasks: 1_user_group.yml
# Download CodiMD
- name: Clone CodiMD project
git:
repo: https://github.com/hackmdio/codimd.git
dest: /var/local/codimd/codimd
version: 1.2.1
become: yes
become_user: codimd
# Installation script
# Setup dependencies and configs
- name: Install CodiMD depedencies
command: bin/setup
args:
chdir: /var/local/codimd/codimd
become: yes
become_user: codimd
# Build front-end bundle
- name: Build front-end for CodiMD
command: npm run build
args:
chdir: /var/local/codimd/codimd
become: yes
become_user: codimd
# Connection to database
- name: Connect CodiMD to PostgreSQL db
template:
src: sequelizerc
dest: /var/local/codimd/codimd/.sequelizerc
owner: codimd
group: codimd
mode: 0600
# Update data base
- name: Migrate the db to the latest schema
command: node_modules/.bin/sequelize db:migrate
args:
chdir: /var/local/codimd/codimd
become: yes
become_user: codimd