??????????????
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 d l Z d d l m
Z
m Z d d l m
Z
d d l m Z m Z d d l m Z d d l m Z e d Z d
e f d YZ d S( i ( t absolute_importt divisiont print_functionsͺ
inventory: yaml
version_added: "2.4"
short_description: Uses a specific YAML file as an inventory source.
description:
- "YAML-based inventory, should start with the C(all) group and contain hosts/vars/children entries."
- Host entries can have sub-entries defined, which will be treated as variables.
- Vars entries are normal group vars.
- "Children are 'child groups', which can also have their own vars/hosts/children and so on."
- File MUST have a valid extension, defined in configuration.
notes:
- If you want to set vars for the C(all) group inside the inventory file, the C(all) group must be the first entry in the file.
- Whitelisted in configuration by default.
options:
yaml_extensions:
description: list of 'valid' extensions for files containing YAML
type: list
default: ['.yaml', '.yml', '.json']
env:
- name: ANSIBLE_YAML_FILENAME_EXT
- name: ANSIBLE_INVENTORY_PLUGIN_EXTS
ini:
- key: yaml_valid_extensions
section: defaults
- section: inventory_plugin_yaml
key: yaml_valid_extensions
sΌ
all: # keys must be unique, i.e. only one 'hosts' per group
hosts:
test1:
test2:
host_var: value
vars:
group_all_var: value
children: # key order does not matter, indentation does
other_group:
children:
group_x:
hosts:
test5 # Note that one machine will work without a colon
#group_x:
# hosts:
# test5 # But this won't
# test7 #
group_y:
hosts:
test6: # So always use a colon
vars:
g2_var2: value3
hosts:
test4:
ansible_host: 127.0.0.1
last_group:
hosts:
test1 # same host as above, additional group membership
vars:
group_last_var: value
N( t AnsibleErrort AnsibleParserError( t string_types( t to_nativet to_text( t MutableMapping( t BaseFileInventoryPlugint InventoryModulec B` s> e Z d Z d Z d Z e d Z d Z d Z RS( t yamlc C` s t t | j d S( N( t superR
t __init__( t self( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.pyR
S s c C` sb t } t t | j | r^ t j j | \ } } | sR | | j d k r^ t } q^ n | S( Nt yaml_extensions( t FalseR R
t verify_filet ost patht splitextt
get_optiont True( R R t validt file_namet ext( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.pyR W s c C` s t t | j | | | | j y | j j | d t } Wn t k
rc } t | n X| sy t d nF t | t
s‘ t d t | n | j d rΏ t d n t | t
rφ x; | D] } | j
| | | qΥ Wn t d t | d S( s parses the inventory file t caches Parsed empty YAML filesH YAML inventory has invalid structure, it should be a dictionary, got: %st plugins2 Plugin configuration YAML file, not YAML inventorys8 Invalid data from file, expected dictionary and got:
%sN( R R
t parset set_optionst loadert load_from_fileR t ExceptionR t
isinstanceR t typet gett _parse_groupR ( R t inventoryR R R t datat et
group_name( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.pyR ` s
c C` s« t | t t f ry | j j | } Wn/ t k
r\ } t d | t | f n X| d k r§x d d d g D] } | | k ry t | | t rΆ i d | | 6| |