??????????????
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_functionsú
lookup: cartesian
version_added: "2.1"
short_description: returns the cartesian product of lists
description:
- Takes the input lists and returns a list that represents the product of the input lists.
- It is clearer with an example, it turns [1, 2, 3], [a, b] into [1, a], [1, b], [2, a], [2, b], [3, a], [3, b].
You can see the exact syntax in the examples section.
options:
_raw:
description:
- a set of lists
required: True
s
- name: Example of the change in the description
debug: msg="{{ [1,2,3]|lookup('cartesian', [a, b])}}"
- name: loops over the cartesian product of the supplied lists
debug: msg="{{item}}"
with_cartesian:
- "{{list1}}"
- "{{list2}}"
- [1,2,3,4,5,6]
si
_list:
description:
- list of lists composed of elements of the input lists
type: lists
( t product( t AnsibleError( t
LookupBase( t listify_lookup_plugin_termst LookupModulec B` s# e Z d Z d „ Z d d „ Z RS( s/
Create the cartesian product of lists
c C` sF g } x9 | D]1 } t | d | j d | j ƒ} | j | ƒ q
W| S( s|
Turn this:
terms == ["1,2,3", "a,b"]
into this:
terms == [[1,2,3], [a, b]]
t templart loader( R t _templart _loadert append( t selft termst resultst xt intermediate( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/cartesian.pyt _lookup_variables5 s
c K` s] | j | ƒ } | } t | ƒ d k r7 t d ƒ ‚ n g t | Œ D] } | j | ƒ ^ qD S( Ni s9 with_cartesian requires at least one element in each list( R t lenR R t _flatten( R
R t variablest kwargst my_listR ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/cartesian.pyt runB s
N( t __name__t
__module__t __doc__R t NoneR ( ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/cartesian.pyR 0 s
N( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt itertoolsR t ansible.errorsR t ansible.plugins.lookupR t ansible.utils.listifyR R ( ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/lookup/cartesian.pyt s