---
- name: Ensure Drupal code is update.
  hosts: codeservers
  become: yes
  ignore_errors: yes
  tasks:
    - name: Checkout code from Git repository.
      git: dest={{ drupal_root_dir }} repo={{ drupal_git_repository }} version=master
      when: drupal_git_repository is defined

- name: Ensure codeservers are ready.
  hosts: codeservers
  become: yes
  roles:
    - pm5.drupal

- name: Ensure Drupal updates are applied.
  hosts: codeservers
  ignore_errors: yes
  tasks:
    - name: Run Drush database update
      shell: drush updb -y
      args:
        chdir: '{{ drupal_docroot_dir }}'
    - name: Run Drush registry rebuild.
      shell: drush registry-rebuild -y
      args:
        chdir: '{{ drupal_docroot_dir }}'

---
- name: Ensure Drupal code is update.
  hosts: codeservers
  become: yes
  ignore_errors: yes
  tasks:
    - name: Checkout code from Git repository.
      git: dest={{ drupal_root_dir }} repo={{ drupal_git_repository }} version=master
      when: drupal_git_repository is defined

- name: Ensure codeservers are ready.
  hosts: codeservers
  become: yes
  roles:
    - pm5.drupal

- name: Ensure Drupal updates are applied.
  hosts: codeservers
  ignore_errors: yes
  tasks:
    - name: Run Drush database update
      shell: drush updb -y
      args:
        chdir: '{{ drupal_docroot_dir }}'
    - name: Run Drush registry rebuild.
      shell: drush registry-rebuild -y
      args:
        chdir: '{{ drupal_docroot_dir }}'
    - name: Run Drush feature revert.
      shell: drush features-revert -y
      args:
        chdir: '{{ drupal_docroot_dir }}'

Add Drush feature revert to update tasks
Add Drush feature revert to update tasks
