浏览代码

Ensure additional databases contain all the keys that we expect

pull/740/head
Slavi Pantaleev 5 年前
父节点
当前提交
3a037a5993
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      roles/matrix-postgres/tasks/util/create_additional_database.yml

+ 7
- 1
roles/matrix-postgres/tasks/util/create_additional_database.yml 查看文件

@@ -1,6 +1,12 @@
--- ---


# TODO - ensure `additional_db` contains all keys that we expect
# It'd be better if this is belonged to `validate_config.yml`, but it would have to be some loop-within-a-loop there,
# and that's ugly. We also don't expect this to catch errors often. It's more of a defensive last-minute check.
- name: Fail if additional database data appears invalid
fail:
msg: "Additional database definition ({{ additional_db }} lacks a required key: {{ item }}"
when: "item not in additional_db"
with_items: "{{ ['name', 'username', 'pass'] }}"


# The SQL statements that we'll run against Postgres are stored in a file that others can't read. # The SQL statements that we'll run against Postgres are stored in a file that others can't read.
# This file will be mounted into the container and fed to Postgres. # This file will be mounted into the container and fed to Postgres.


正在加载...
取消
保存