---
- hosts: workers
  sudo: True

  pre_tasks:
    - name: Update APT cache
      apt: update_cache=yes cache_valid_time=3600

  roles:
    - { role: "model-my-watershed.geoprocessing" }
    - { role: "model-my-watershed.celery-worker" }
    - { role: "model-my-watershed.rwd" }

---
- hosts: workers
  sudo: True

  pre_tasks:
    - name: Update APT cache
      apt: update_cache=yes cache_valid_time=3600

    - name: Install backported kernel
      apt: pkg={{ item }} state=present
      with_items:
        - linux-headers-3.19.0-39
        - linux-headers-3.19.0-39-generic
        - linux-image-3.19.0-39-generic
        - linux-image-extra-3.19.0-39-generic

  roles:
    - { role: "model-my-watershed.geoprocessing" }
    - { role: "model-my-watershed.celery-worker" }
    - { role: "model-my-watershed.rwd" }

Use backported kernel to avoid recent AUFS bugs
Use backported kernel to avoid recent AUFS bugs

Bugs in a recent version of AUFS (included in the kernel) can produce
zombie processes that consume 100% CPU utilization. Using a backported
kernel allows things to continue to function as they did prior to the
bug. We'll remove this workaround once the fix is included in another
kernel update.

See also:

- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1533043
- https://bugzilla.kernel.org/show_bug.cgi?id=109971
