Created
February 20, 2014 01:05
-
-
Save rdkls/9104936 to your computer and use it in GitHub Desktop.
Ansible tasks to set (aka register) a variable, based on stdout of a shell command
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 gridfs host ip from name (required for nginx gridfs module) | |
shell: 'ping -q -c 1 -t 1 {{ gridfs_host }} | grep PING | sed -e "s/).*//" | sed -e "s/.*(//"' | |
register: gridfs_ip_command | |
when: gridfs_ip is not defined | |
- name: set gridfs ip | |
set_fact: gridfs_ip={{ gridfs_ip_command.stdout }} | |
when: gridfs_ip is not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment