Hi,
i have a following problem. I am building OpenStack which uses tool openstack-config for setting value in configuration files.
To get value:
openstack-config --get /etc/keystone/keystone.conf sql connection
To set value:
openstack-config --set /etc/keystone/keystone.conf sql connection {{ VALUE }}
So now I want to check if previous value matches the value I provide. If they do match, than it should report OK, otherwise CHANGED. Current solution is to register shell result of GET command and conditionally execute SET command, but I don’t like that very much because I have to do that 50-100 times; therefore code would be quite unreadable.
Does ansible provide easy mechanism to merge these two tasks or is copying ansible shell module and extending it the only solution?
PS: sorry for bad title