??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
àUdac @` sz d d l m Z m Z m Z e Z d Z d Z d Z d d l Z d d l
m Z d d l m
Z
d e
f d „ ƒ YZ d S(
i ( t absolute_importt divisiont print_functions¥
lookup: pipe
author: Daniel Hokka Zakrisson
version_added: "0.9"
short_description: read output from a command
description:
- Run a command and return the output.
options:
_terms:
description: command(s) to run.
required: True
notes:
- Like all lookups this runs on the Ansible controller and is unaffected by other keywords, such as become,
so if you need to different permissions you must change the command or run Ansible as another user.
- Alternatively you can use a shell/command task that runs against localhost and registers the result.
- Pipe lookup internally invokes Popen with shell=True (this is required and intentional).
This type of invocation is considered as security issue if appropriate care is not taken to sanitize any user provided or variable input.
It is strongly recommended to pass user input or variable input via quote filter before using with pipe lookup.
See example section for this.
Read more about this L(Bandit B602 docs,https://bandit.readthedocs.io/en/latest/plugins/b602_subprocess_popen_with_shell_equals_true.html)
sü
- name: raw result of running date command"
debug:
msg: "{{ lookup('pipe', 'date') }}"
- name: Always use quote filter to make sure your variables are safe to use with shell
debug:
msg: "{{ lookup('pipe', 'getent ' + myuser | quote ) }}"
s9
_string:
description:
- stdout from command
N( t AnsibleError( t
LookupBaset LookupModulec B` s e Z d „ Z RS( c K` s¶ g } x© | D]¡ } t | ƒ } t j | d | j j ƒ d t d t j d t j ƒ} | j ƒ \ } } | j d k r• | j | j
d ƒ j ƒ ƒ q
t d | | j f ƒ ‚ q
W| S( Nt cwdt shellt stdint stdouti s utf-8s" lookup_plugin.pipe(%s) returned %d(
t strt
subprocesst Popent _loadert get_basedirt Truet PIPEt communicatet
returncodet appendt decodet rstripR ( t selft termst variablest kwargst rett termt pR t stderr( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/pipe.pyt run5 s
6( t __name__t
__module__R ( ( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/pipe.pyR 3 s ( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNR t ansible.errorsR t ansible.plugins.lookupR R ( ( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/pipe.pyt s