Manual merge of master into xovis branch

It’s your call.  

I take it both of these lines should be conditional

DBS=$(kanso listdb)
if [[ "$DBS" == *$DB_NAME* ]]
then
    echo "Db $DB_NAME already exists"
else
    echo "Creating empty database for the app."
    kanso createdb $DB_URL
fi

echo "Loading the application into new database $DB_NAME."
kanso push $XOVIS_REPO_DEST $DB_URL

But then I need to have a test for db exists.

Tim

From: Martin Dluhos 
Sent: Sunday, July 06, 2014 3:24 PM
To: XSCE/xsce 
Cc: Tim Moody 
Subject: Re: [xsce] Manual merge of master into xovis branch (#145)

In roles/xovis/tasks/main.yml:

> +  command: sed -i 's/^\(bind_address\s*=\s*\).*$/\10\.0\.0\.0/' /etc/couchdb/default.ini
> +
> +- name: Enable Couchdb service
> +  service: name=couchdb
> +           enabled=yes
> +           state=started
> +
> +- name: Add admin user
> +  command: curl -X PUT {{ xovis_target_host }}/_config/admins/{{ xovis_db_user }} -d "\"{{ xovis_db_password }}\""
> +
> +# Replaced commands below with kanso equivalents
> +  
> +- name: Remove Couch database if it already exists - ignore errors
> +  command: kanso deletedb {{ xovis_db_url }}
> +  ignore_errors: yes
> +#  command: curl -X DELETE {{ xovis_db_url }}
Actually, the bash script uses the existing db if it already exists. I prefer not to delete the db to preserve the existing data.

—
Reply to this email directly or view it on GitHub.