??????????????
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 m
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_functionsT
lookup: flattened
author: Serge van Ginderachter
version_added: "1.3"
short_description: return single list completely flattened
description:
- given one or more lists, this lookup will flatten any list elements found recursively until only 1 list is left.
options:
_terms:
description: lists to flatten
required: True
notes:
- unlike 'items' which only flattens 1 level, this plugin will continue to flatten until it cannot find lists anymore.
- aka highlander plugin, there can only be one (list).
sš
- name: "'unnest' all elements into single list"
debug: msg="all in one list {{lookup('flattened', [1,2,3,[5,6]], [a,b,c], [[5,6,1,3], [34,a,b,c]])}}"
s@
_raw:
description:
- flattened list
type: list
( t AnsibleError( t string_types( t
LookupBase( t listify_lookup_plugin_termst LookupModulec B` s# e Z d „ Z d „ Z d „ Z RS( c C` sS t | t ƒ rO t | ƒ d k rO | d } t | t ƒ rO | j | ƒ } qO n | S( Ni i ( t
isinstancet listt lent _check_list_of_one_list( t selft term( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/flattened.pyR * s
!
c C` sÌ g } x¿ | D]· } | j | ƒ } | d k s: | d k r> Pn t | t ƒ r† t | d | j d | j ƒ} | | g k r† | } q† n t | t ƒ r· | j | | ƒ } | j | ƒ q
| j | ƒ q
W| S( Nt Nonet nullt templart loader(
R R R R t _templart _loaderR t _do_flattent extendt append( R t termst variablest retR
t term2( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/flattened.pyR 5 s
c K` s. t | t ƒ s t d ƒ ‚ n | j | | ƒ S( Ns with_flattened expects a list( R R R R ( R R R t kwargs( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/flattened.pyt runO s ( t __name__t
__module__R R R ( ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/flattened.pyR ( s N( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt ansible.errorsR t ansible.module_utils.sixR t ansible.plugins.lookupR t ansible.utils.listifyR R ( ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/flattened.pyt s