
couchdb_install_curl:
  pkg.installed:
    - name: curl

{% for db in ('_users', '_replicator', '_global_changes') %}
couchdb_db_init_create{{db}}:
  cmd.run:
    - name: curl -X PUT http://127.0.0.1:5984/{{ db }}
    - unless: curl -X GET http://127.0.0.1:5984/{{ db }} --fail
    - require:
      - pkg: curl
{% endfor %}

Add initialisation state for single node setup
Add initialisation state for single node setup

CouchDB does not initiate system databases on startup. State
couchdb2.single_node_init should take care of that. More info:
http://docs.couchdb.org/en/2.0.0/install/index.html#single-node-setup

Signed-off-by: Michal Kuffa <005ee1c97edba97d164343c993afee612ac25a0c@gmail.com>

Couchberry/couchdb2-formula