Hi Sudip,
Please show us what you've tried and gotten stuck with -- there are
plenty of solutions already if you google for "ansible increment
integer".
One thing to be aware of, is that you will need to have a central
"store" of truth for your integer. Ansible is both stateless and able to
be run from any computer. Your BUILD_VERSION will need to acquire the
"latest" last highest integer from somewhere, and then increment and
update that
There are many alternatives for this, from the simple "I only run it on
this 1 machine", to using etcd or some other distributed key/value
store, to track and increment the global counter.
As a very general rule, I highly recommend using UUID/GUID for
versioning as the concepts of ordering in time and space tend to get
rather sloppy when dealing with distributed computer systems. UUIDs are
intended to be unique by design. Is that sufficient?
A+
Dave