Last active
August 29, 2015 14:21
-
-
Save toast38coza/fde2b59e9e07af9f9c1d to your computer and use it in GitHub Desktop.
Given a variable `http_port` stored in redis, incr the value and return the new port
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis-cli incr http_port | cut -c1-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Get a unique port on this host | |
| shell: "redis-cli incr http_port | cut -c1-8" | |
| register: http_port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment