This file contains 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
twemproxy-source: | |
archive: | |
- extracted | |
- name: /tmp/ | |
- source: https://twemproxy.googlecode.com/files/nutcracker-0.3.0.tar.gz | |
- source_hash: sha1=b17f973ff2de9bd5e21417786a1449bea1557fba | |
- archive_format: tar | |
- tar_options: z | |
- if_missing: /tmp/nutcracker-0.3.0 |
This file contains 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
data = dict(line.split(None, 1) for line in ''' | |
key1 value | |
key2 value | |
key3 another value | |
key4 yet another value | |
'''.strip().splitlines()) |
This file contains 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
def exists(path, as_user=None, use_sudo=False, verbose=False): | |
""" | |
Return True if given path exists on the current remote host. | |
If ``as_user`` is set, will use `sudo` as that user instead of `run`. If | |
''as_user'' or ''use_sudo'' is True, will use 'sudo' as root. | |
`exists` will, by default, hide all output (including the run line, stdout, | |
stderr and any warning resulting from the file not existing) in order to | |
avoid cluttering output. You may specify ``verbose=True`` to change this |
NewerOlder