---
- include: prepare.yml tags=install,prepare

- name: check installed version
  shell: >
    cat {{ roundcube_base_dir }}/.version || echo ''
  changed_when: false
  register: installed_version
  tags: install

- include: install.yml tags=install,deploy
  when: installed_version.stdout != roundcube_version

- include: plugins.yml tags=install,plugins

- include: configure.yml tags=config

- include: database.yml tags=database

- name: link runscript for php-fpm pool
  file: >
    state=link
    src=/etc/init.d/php-fpm
    dest=/etc/init.d/{{ roundcube_name }}
  tags: fpm

- name: enable and start roundcube
  service: >
    name={{ roundcube_name }}
    enabled=yes
    state=started
  tags: [services, fpm]

- name: "ensure that https://{{ roundcube_domain }} returns HTTP 200"
  sudo: no
  local_action: uri url=https://{{ roundcube_domain }} status_code=200 timeout=10
  when: roundcube_domain
  tags: check

---
- include: prepare.yml tags=install,prepare

- name: check installed version
  shell: >
    cat {{ roundcube_base_dir }}/.version || echo ''
  changed_when: false
  register: installed_version
  tags: install

- include: install.yml tags=install,deploy
  when: installed_version.stdout != roundcube_version

- include: plugins.yml tags=install,plugins

- include: configure.yml tags=config

- include: database.yml tags=database

- name: link runscript for php-fpm pool
  file: >
    state=link
    src=/etc/init.d/php-fpm
    dest=/etc/init.d/{{ roundcube_name }}
  tags: fpm

- name: enable and start roundcube
  service: >
    name={{ roundcube_name }}
    enabled=yes
    state=started
  tags: [services, fpm]

- name: "ensure that https://{{ roundcube_domain }} returns HTTP 200"
  sudo: no
  local_action: uri url=https://{{ roundcube_domain }} status_code=200 timeout=10
  when: roundcube_domain is defined
  tags: check

Fix condition in HTTP check
Fix condition in HTTP check
