??????????????
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¤ddlmZmZmZeZdZdZdZddl m Z ddl m Z ddl mZddlmZdd lmZdZd efd „ƒYZd S(i(tabsolute_importtdivisiontprint_functionsæ lookup: subelements author: Serge van Ginderachter version_added: "1.4" short_description: traverse nested key from a list of dictionaries description: - Subelements walks a list of hashes (aka dictionaries) and then traverses a list with a given (nested sub-)key inside of those records. options: _terms: description: tuple of list of dictionaries and dictionary key to extract required: True skip_missing: default: False description: - If set to True, the lookup plugin will skip the lists items that do not contain the given subkey. If False, the plugin will yield an error and complain about the missing subkey. så - name: show var structure as it is needed for example to make sense hosts: all vars: users: - name: alice authorized: - /tmp/alice/onekey.pub - /tmp/alice/twokey.pub mysql: password: mysql-password hosts: - "%" - "127.0.0.1" - "::1" - "localhost" privs: - "*.*:SELECT" - "DB1.*:ALL" groups: - wheel - name: bob authorized: - /tmp/bob/id_rsa.pub mysql: password: other-mysql-password hosts: - "db1" privs: - "*.*:SELECT" - "DB2.*:ALL" tasks: - name: Set authorized ssh key, extracting just that data from 'users' authorized_key: user: "{{ item.0.name }}" key: "{{ lookup('file', item.1) }}" with_subelements: - "{{ users }}" - authorized - name: Setup MySQL users, given the mysql hosts and privs subkey lists mysql_user: name: "{{ item.0.name }}" password: "{{ item.0.mysql.password }}" host: "{{ item.1 }}" priv: "{{ item.0.mysql.privs | join('/') }}" with_subelements: - "{{ users }}" - mysql.hosts - name: list groups for users that have them, don't error if groups key is missing debug: var=item loop: "{{lookup('subelements', users, 'groups', {'skip_missing': True})}}" s5 _list: description: list of subelements extracted (t AnsibleError(t string_types(tboolean(t LookupBase(tlistify_lookup_plugin_termst skip_missingt LookupModulecB`seZd„ZRS(c K`sCdd„}t|dd|jd|jƒ|dfirst a dict or a list, second a string pointing to the subkeyt.tskippeds4the optional third item must be a dict with flags %ss1subelements lookup expects a dictionary, got '%s'Rtstrictiÿÿÿÿs-could not find '%s' key in iterated item '%s's1the key %s should point to a dictionary, got '%s's+the key %s should point to a list, got '%s'(Rt_templart_loadert isinstancetlisttlentdictRtsplittgettFalsetappendtalltFLAGSRRtTruetpop(tselfttermst variablestkwargsR t subelementst elementlisttkeytflagstrettitem0Rtsubvaluet lastsubkeytsublisttsubkeytitem1((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/subelements.pytrunas` &3 .   E      (t__name__t __module__R/(((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/subelements.pyR _sN(s skip_missing(t __future__RRRttypet __metaclass__t DOCUMENTATIONtEXAMPLEStRETURNtansible.errorsRtansible.module_utils.sixRt)ansible.module_utils.parsing.convert_boolRtansible.plugins.lookupRtansible.utils.listifyRRR (((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/subelements.pyts7