mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix code-blocks to use correct syntax highlighting
This commit is contained in:
@@ -48,11 +48,24 @@ author:
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
ansible host -m slurp -a 'src=/tmp/xx'
|
||||
host | success >> {
|
||||
"content": "aGVsbG8gQW5zaWJsZSB3b3JsZAo=",
|
||||
"encoding": "base64"
|
||||
}
|
||||
# Find out what the remote machine's mounts are:
|
||||
- slurp:
|
||||
src: /proc/mounts
|
||||
register: mounts
|
||||
|
||||
- debug:
|
||||
msg: "{{ mounts['content'] | b64decode }}"
|
||||
|
||||
# From the commandline, find the pid of the remote machine's sshd
|
||||
# $ ansible host -m slurp -a 'src=/var/run/sshd.pid'
|
||||
# host | SUCCESS => {
|
||||
# "changed": false,
|
||||
# "content": "MjE3OQo=",
|
||||
# "encoding": "base64",
|
||||
# "source": "/var/run/sshd.pid"
|
||||
# }
|
||||
# $ echo MjE3OQo= | base64 -d
|
||||
# 2179
|
||||
'''
|
||||
|
||||
import base64
|
||||
|
||||
Reference in New Issue
Block a user