ansible-roles/couchbase/tasks/couchbase.yml

30 lines
929 B
YAML

---
- name: Get the meta package for the couchbase repository
get_url: url={{ couchbase_repo_pkg_url }} dest=/root/{{ couchbase_repo_pkg }}
register: couchbase_repository
tags: couchbase
- name: Install the package source and the Couchbase public keys
shell: /usr/bin/dpkg -i /root/couchbase-release-1.0-2-amd64.deb
when: ( couchbase_repository | changed )
tags: couchbase
- name: Install the latest version of couchbase community server
apt: pkg={{ item }} state=latest update_cache=yes
with_items:
- couchbase-server-community
when:
- couchbase_install_packages
tags: couchbase
- name: Ensure couchbase is started and enabled
service: name=couchbase-server state=started enabled=yes
when: couchbase_start_server
tags: couchbase
- name: Ensure couchbase is stopped and disabled
service: name=couchbase-server state=stopped enabled=no
when: not couchbase_start_server
tags: couchbase