ansible/roles/rails/tasks/main.yml in subspace-2.0.4 vs ansible/roles/rails/tasks/main.yml in subspace-2.1.0

- old
+ new

@@ -11,16 +11,19 @@ - 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: @@ -28,19 +31,22 @@ regexp: '<policy domain="coder" rights="none" pattern="PDF" />' line: ' <policy domain="coder" rights="read" pattern="PDF" />' 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 @@ -70,5 +76,34 @@ 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 +