blob: 2a0b4f6c377e8226aad9f65b3e59da7946f8d53b [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
# This playbook deploys a MongoDB for Openwhisk.
- hosts: localhost
tasks:
- name: check if db_local.ini exists?
tags: ini
stat: path="{{ playbook_dir }}/db_local.ini"
register: db_check
- name: prepare db_local.ini
tags: ini
local_action: template src="db_local.ini.j2" dest="{{ playbook_dir }}/db_local.ini"
when: not db_check.stat.exists
# This is for test, only deploy it on the first node, please use a shard cluster mongodb for
# production env
- hosts: db[0]
roles:
- mongodb