33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: install systems to help setup couchdb from a ppa
|
|
apt: pkg=python-apt state=present
|
|
|
|
- name: add the couchdb ppa repository
|
|
apt_repository: repo="ppa:couchdb/stable" state=present
|
|
|
|
- name: install couchdb
|
|
apt: pkg=couchdb state=present
|
|
with_items:
|
|
- couchdb
|
|
- couchdb-bin
|
|
- couchdb-common
|
|
|
|
# TODO Add in installation and configuration of py-couchdb views?
|
|
|
|
# Configure CouchDB
|
|
- name: add admin user and password
|
|
ini_file: dest=/etc/couchdb/local.ini backup=yes state=present
|
|
section=admins option={{ rookeries_db.username }} value={{ rookeries_db.password }}
|
|
|
|
- name: force couchdb to authenticate users
|
|
ini_file: dest=/etc/couchdb/local.ini backup=yes state=present
|
|
section=couch_httpd_auth option=require_valid_user value=true
|
|
|
|
- name: allow couchdb to respond back across network
|
|
ini_file: dest=/etc/couchdb/local.ini backup=yes state=present
|
|
section=httpd option=bind_address value=0.0.0.0
|
|
|
|
# Restart couchdb. Should be using the upstart start and stop commands rather than service.
|
|
- name: stop couchdb server
|
|
service: name=couchdb state=restarted
|