??????????????
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 @` sŠ 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 d l m Z d e
f d
„ ƒ YZ d S( i ( t absolute_importt divisiont print_functions±
lookup: lines
author: Daniel Hokka Zakrisson
version_added: "0.9"
short_description: read lines from command
description:
- Run one or more commands and split the output into lines, returning them as a list
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'.
If you need to use 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.
sr
- name: We could read the file directly, but this shows output from command
debug: msg="{{ item }} is an output line from running cat on /etc/motd"
with_lines: cat /etc/motd
- name: More useful example of looping over a command result
shell: "/usr/bin/frobnicate {{ item }}"
with_lines:
- "/usr/bin/frobnications_per_host --param {{ inventory_hostname }}"
s@
_list:
description:
- lines of stdout from command
N( t AnsibleError( t
LookupBase( t to_textt LookupModulec B` s e Z d „ Z RS( c
K` sº g } x | D]¥ } t j | d | j j ƒ d t d t j d t j ƒ} | j ƒ \ } } | j d k r™ | j g | j ƒ D] } t
| ƒ ^ q} ƒ q
t d | | j f ƒ ‚ q
W| S( Nt cwdt shellt stdint stdouti s# lookup_plugin.lines(%s) returned %d( t
subprocesst Popent _loadert get_basedirt Truet PIPEt communicatet
returncodet extendt
splitlinesR R (
t selft termst variablest kwargst rett termt pR
t stderrt l( ( s@ /usr/lib/python2.7/site-packages/ansible/plugins/lookup/lines.pyt run2 s
6/( t __name__t
__module__R ( ( ( s@ /usr/lib/python2.7/site-packages/ansible/plugins/lookup/lines.pyR 0 s ( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNR t ansible.errorsR t ansible.plugins.lookupR t ansible.module_utils._textR R ( ( ( s@ /usr/lib/python2.7/site-packages/ansible/plugins/lookup/lines.pyt s