??????????????
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”ddlmZmZmZeZdZdZddlZddl m Z ddl m Z ddlmZddlmZd efd „ƒYZdS( i(tabsolute_importtdivisiontprint_functions" name: generator plugin_type: inventory version_added: "2.6" short_description: Uses Jinja2 to construct hosts and groups from patterns description: - Uses a YAML configuration file with a valid YAML or C(.config) extension to define var expressions and group conditionals - Create a template pattern that describes each host, and then use independent configuration layers - Every element of every layer is combined to create a host for every layer combination - Parent groups can be defined with reference to hosts and other groups using the same template variables options: plugin: description: token that ensures this is a source file for the 'generator' plugin. required: True choices: ['generator'] hosts: description: - The C(name) key is a template used to generate hostnames based on the C(layers) option. Each variable in the name is expanded to create a cartesian product of all possible layer combinations. - The C(parents) are a list of parent groups that the host belongs to. Each C(parent) item contains a C(name) key, again expanded from the template, and an optional C(parents) key that lists its parents. - Parents can also contain C(vars), which is a dictionary of vars that is then always set for that variable. This can provide easy access to the group name. E.g set an C(application) variable that is set to the value of the C(application) layer name. layers: description: - A dictionary of layers, with the key being the layer name, used as a variable name in the C(host) C(name) and C(parents) keys. Each layer value is a list of possible values for that layer. sÿ # inventory.config file in YAML format plugin: generator strict: False hosts: name: "{{ operation }}-{{ application }}-{{ environment }}-runner" parents: - name: "{{ operation }}-{{ application }}-{{ environment }}" parents: - name: "{{ operation }}-{{ application }}" parents: - name: "{{ operation }}" - name: "{{ application }}" - name: "{{ application }}-{{ environment }}" parents: - name: "{{ application }}" vars: application: "{{ application }}" - name: "{{ environment }}" vars: environment: "{{ environment }}" - name: runner layers: operation: - build - launch environment: - dev - test - prod application: - web - api N(tproduct(t constants(tAnsibleParserError(tBaseInventoryPlugintInventoryModulecB`sDeZdZdZd„Zd„Zd„Zd„Zed„Z RS(s> constructs groups and vars using Jinja2 template expressions t generatorcC`stt|ƒjƒdS(N(tsuperRt__init__(tself((sG/usr/lib/python2.7/site-packages/ansible/plugins/inventory/generator.pyR XscC`sct}tt|ƒj|ƒr_tjj|ƒ\}}| sS|dgtjkr_t }q_n|S(Ns.config( tFalseR Rt verify_filetostpathtsplitexttCtYAML_FILENAME_EXTENSIONStTrue(R Rtvalidt file_nametext((sG/usr/lib/python2.7/site-packages/ansible/plugins/inventory/generator.pyR \s  cC`s||j_|jj|ƒS(N(ttemplartavailable_variablest do_template(R tpatternt variables((sG/usr/lib/python2.7/site-packages/ansible/plugins/inventory/generator.pyttemplategs c C`sxù|D]ñ}y|j|d|ƒ}Wn+ttfk rTtd|dƒ‚nX||jkrt|j|ƒn|j|}xB|jdiƒjƒD](\}} |j||j| |ƒƒqšW|j ||ƒ|j |||jdgƒ|ƒqWdS(Ntnames,Element %s has a parent with no name elementtvarstparents( RtAttributeErrort ValueErrorRtgroupst add_grouptgettitemst set_variablet add_childt add_parents( R t inventorytchildRt template_varstparentt groupnametgrouptktv((sG/usr/lib/python2.7/site-packages/ansible/plugins/inventory/generator.pyR(ks  % c C`sçtt|ƒj|||d|ƒ|j|ƒ}t|djƒŒ}x™|D]‘}tƒ}x2t|djƒƒD]\} } || || s #