??????????????
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 e f d „ ƒ YZ d
S( i ( t absolute_importt divisiont print_functions´
lookup: dict
version_added: "1.5"
short_description: returns key/value pair items from dictionaries
description:
- Takes dictionaries as input and returns a list with each item in the list being a dictionary with 'key' and 'value' as
keys to the previous dictionary's structure.
options:
_terms:
description:
- A list of dictionaries
required: True
s´
vars:
users:
alice:
name: Alice Appleworth
telephone: 123-456-7890
bob:
name: Bob Bananarama
telephone: 987-654-3210
tasks:
# with predefined vars
- name: Print phone records
debug:
msg: "User {{ item.key }} is {{ item.value.name }} ({{ item.value.telephone }})"
loop: "{{ lookup('dict', users) }}"
# with inline dictionary
- name: show dictionary
debug:
msg: "{{item.key}}: {{item.value}}"
with_dict: {a: 1, b: 2, c: 3}
# Items from loop can be used in when: statements
- name: set_fact when alice in key
set_fact:
alice_exists: true
loop: "{{ lookup('dict', users) }}"
when: "'alice' in item.key"
sb
_list:
description:
- list of composed dictonaries with key and value
type: list
( t AnsibleError( t
LookupBase( t Mappingt LookupModulec B` s e Z d d „ Z RS( c K` sj t | t ƒ s | g } n g } xB | D]: } t | t ƒ sL t d ƒ ‚ n | j | j | ƒ ƒ q( W| S( Ns with_dict expects a dict( t
isinstancet listR R t extendt _flatten_hash_to_list( t selft termst variablest kwargst resultst term( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/dict.pyt run? s
N( t __name__t
__module__t NoneR ( ( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/dict.pyR = s N( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt ansible.errorsR t ansible.plugins.lookupR t/ ansible.module_utils.common._collections_compatR R ( ( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/lookup/dict.pyt s