??????????????
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 y d d l Z e Z Wn e k
r Z e Z n Xd e f d
YZ d S( i ( t absolute_importt divisiont print_functionsΕ
lookup: chef_databag
version_added: "2.3"
short_description: fetches data from a Chef Databag
description:
- "This is a lookup plugin to provide access to chef data bags using the pychef package.
It interfaces with the chef server api using the same methods to find a knife or chef-client config file to load parameters from,
starting from either the given base path or the current working directory.
The lookup order mirrors the one from Chef, all folders in the base path are walked back looking for the following configuration
file in order : .chef/knife.rb, ~/.chef/knife.rb, /etc/chef/client.rb"
requirements:
- "pychef (python library https://pychef.readthedocs.io `pip install pychef`)"
options:
name:
description:
- Name of the databag
required: True
item:
description:
- Item to fetch
required: True
sc
- debug:
msg: "{{ lookup('chef_databag', 'name=data_bag_name item=data_bag_item') }}"
s=
_raw:
description:
- The value from the databag
( t AnsibleError( t
LookupBase( t parse_kvNt LookupModulec B` s2 e Z d Z d d d Z d Z d d Z RS( s%
Chef data bag lookup module
c K` s2 t t | j | | | d | _ d | _ d S( N( t superR t __init__t Nonet namet item( t selft loadert templart kwargs( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/chef_databag.pyR 8 s c C` sͺ x d d g D]v } yD | j | d } | d k r: w
n t | } t | | | Wq
t k
r t d j | | q
Xq
W| r¦ t d | j n d S( s1
parse key-value style arguments
R
R s! can't parse arg {0}={1} as strings+ unrecognized arguments to with_sequence: %rN( t popR t strt setattrt
ValueErrorR t formatt keys( R t argst argt arg_rawt parsed( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/chef_databag.pyt
parse_kv_args@ s
c K` s t s t d n x! | D] } | j t | q Wt j } t | t j j si t d n t j | j
} | | j } t | g S( Ns9 PyChef needed for lookup plugin, try `pip install pychef`s% Unable to connect to Chef Server API.(
t HAS_CHEFR R R t cheft
autoconfiguret
isinstancet apit ChefAPIt DataBagR
R t dict( R t termst variablesR t termt
api_objectt data_bag_objectt
data_bag_item( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/chef_databag.pyt runU s
N( t __name__t
__module__t __doc__R R R R) ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/chef_databag.pyR 4 s ( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt ansible.errorsR t ansible.plugins.lookupR t ansible.parsing.splitterR R t TrueR t ImportErrort missing_modulet FalseR ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/lookup/chef_databag.pyt s