---
- name: Install rails apt dependencies
apt:
name: "{{item}}"
with_items:
- git
- libffi-dev
- libgmp3-dev
- libpq-dev
- libxslt-dev
- nodejs
- zlib1g-dev
- ffmpeg
become: true
when: ('Ubuntu' in ansible_distribution)
- name: Install imagemagick
apt:
name: ['imagemagick', 'libmagickwand-dev']
become: true
tags:
- imagemagick
when: ('Ubuntu' in ansible_distribution)
- name: Update ImageMagick policy to enable reading PDF files
lineinfile:
path: /etc/ImageMagick-6/policy.xml
regexp: ''
line: ' '
backrefs: yes
become: true
tags:
- imagemagick
when: ('Ubuntu' in ansible_distribution)
- name: Create /u/apps/{{project_name}}/shared/config
file:
path: /u/apps/{{project_name}}/shared/config/
state: directory
become: true
become_user: "{{deploy_user}}"
- name: Create database.yml
template:
src: database.yml
dest: /u/apps/{{project_name}}/shared/config/database.yml
owner: "{{deploy_user}}"
become: true
- name: Create application.yml (legacy)
when: appyml is defined
template:
src: application.yml
dest: /u/apps/{{project_name}}/shared/config/application.yml
owner: "{{deploy_user}}"
become: true
tags:
- appyml
- debug:
msg: "Warning: Using legacy appyml for variable configuration. Consider switching to application.yml.template"
verbosity: 0
when: appyml is defined
tags:
- appyml
- name: Create application.yml
when: appyml is not defined
template:
src: application.yml.template
dest: /u/apps/{{project_name}}/shared/config/application.yml
owner: "{{deploy_user}}"
tags:
- appyml