---
- apt: pkg={{ item }}
  with_items:
    - memcached
    - python-memcache

- template: src=memcached.conf dest=/etc/memcached.conf mode=0644
  notify:
    - restart memcached

---
- apt: pkg={{ item }}
  with_items:
    - memcached
    - python-memcache

- name: "remove /nonexistant inadvertently created by memcached package: see https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/1255328/"
  shell: rm -rf /nonexistant

- template: src=memcached.conf dest=/etc/memcached.conf mode=0644
  notify:
    - restart memcached

Remove /nonexistant after installing memcached package
Remove /nonexistant after installing memcached package
