I have a large application getting deployed via a series of Ansible roles. The last piece involved with getting the application configured is a series of Postgres DB queries.
The queries look like this:
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;
What is the best method of getting these queries applied to a specific DB with Ansible?