Skip to content

Instantly share code, notes, and snippets.

@toast38coza
Last active August 29, 2015 14:21
Show Gist options
  • Save toast38coza/fde2b59e9e07af9f9c1d to your computer and use it in GitHub Desktop.
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
redis-cli incr http_port | cut -c1-8
- 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