【发布时间】:2022-09-22 22:30:52
【问题描述】:
我有一个通过一系列 Ansible 角色部署的大型应用程序。配置应用程序的最后一部分是一系列 Postgres DB 查询。
查询如下所示:
update inboxdb.T_CONFIGURATION_VALUE set value=\'file:/usr/local/app/Keystore\' where SAK_CONFIGURATION_KEY = (select SAK_CONFIGURATION_KEY from inboxdb.T_CONFIGURATION_KEY where keyname=\'lifeimage.x509.keystorePath\');
update inboxdb.T_CONFIGURATION_VALUE set value=\'file:/usr/local/app/Keystore\' where SAK_CONFIGURATION_KEY = (select SAK_CONFIGURATION_KEY from inboxdb.T_CONFIGURATION_KEY where keyname=\'lifeimage.x509.keystorePath2\');
insert into inboxdb.t_tier (sak_tier, name, tier_position) values (4, \'tier3\', 4);
insert into inboxdb.t_storage_provider (sak_storage_provider, dtype, name, context_path, sak_tier, version) values (4, \'VOLUME\', \'provider4\', \'/cloudapp_vol1\', 4, 0);
update inboxdb.t_tier set tier_position = 0 where sak_tier = 4;
update inboxdb.t_tier set tier_position = 3 where sak_tier = 1;
使用 Ansible 将这些查询应用于特定数据库的最佳方法是什么?
标签: linux postgresql ansible