--- - name: Install rails apt dependencies apt: name: ['git', 'libffi-dev', 'libgmp3-dev', 'libpq-dev', 'libxslt-dev', 'nodejs', 'zlib1g-dev' ,'ffmpeg'] become: true when: ('Ubuntu' in ansible_distribution) tags: - maintenance - name: Install imagemagick apt: name: ['imagemagick', 'libmagickwand-dev'] become: true tags: - maintenance - 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: - maintenance - 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}}" tags: - maintenance - 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 when: appyml is not defined template: src: application.yml.template dest: /u/apps/{{project_name}}/shared/config/application.yml owner: "{{deploy_user}}" tags: - appyml - name: Grab Rails version shell: bundle exec rails --version args: chdir: /u/apps/{{project_name}}/current register: stats_rails_version when: send_stats == true and stats_url is defined and stats_api_key is defined tags: - maintenance - stats - name: Send Rails stats to URL uri: url: "{{stats_url}}" method: POST headers: X-API-Version: 1 X-Client-Api-key: "{{stats_api_key}}" body_format: json body: client_stat: key: rails_version value: "{{stats_rails_version.stdout}}" hostname: "{{hostname}}" when: send_stats == true and stats_url is defined and stats_api_key is defined tags: - maintenance - stats