Sha256: 56c2a22518d1c0fad1b05610e1bf730232577e649fc791e3c4f1e610fdc866a0

Contents?: true

Size: 992 Bytes

Versions: 2

Compression:

Stored size: 992 Bytes

Contents

---
- name: Remove the app's symlink, if exists
  command: rm -rf /etc/nginx/sites-enabled/{{project_name}}
  become: true

- name: create nginx config for rails app
  template:
    src: nginx-project
    dest: /etc/nginx/sites-available/{{project_name}}
  become: true

- name: Enable the app
  file:
    src: /etc/nginx/sites-available/{{project_name}}
    dest: /etc/nginx/sites-enabled/{{project_name}}
    state: "{{ (ssl_enabled and nginx_ssl_config is defined) | ternary('absent', 'link') }}"
  become: true

- name: create ssl nginx config for rails app
  template:
    src: nginx-project-ssl
    dest: /etc/nginx/sites-available/{{project_name}}-ssl
  when: (ssl_enabled and nginx_ssl_config is defined)
  become: true

- name: Enable SSL configured app
  file:
    src: /etc/nginx/sites-available/{{project_name}}-ssl
    dest: /etc/nginx/sites-enabled/{{project_name}}-ssl
    state: "{{ (ssl_enabled and nginx_ssl_config is defined) | ternary('link', 'absent') }}"
  become: true

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
subspace-0.4.5 ansible/roles/nginx-rails/tasks/main.yml
subspace-0.4.4 ansible/roles/nginx-rails/tasks/main.yml