??????????????
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πddlmZmZmZeZidd6dgd6dd6ZdZd Zd Z dd l Z dd l m Z m Z dd lmZddlmZddlmZde jfd„ƒYZe jdeƒd„Zedkrμeƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bysV --- module: read_csv version_added: '2.8' short_description: Read a CSV file description: - Read a CSV file and return a list or a dictionary, containing one dictionary per row. author: - Dag Wieers (@dagwieers) options: path: description: - The CSV filename to read data from. type: path required: yes aliases: [ filename ] key: description: - The column name used as a key for the resulting dictionary. - If C(key) is unset, the module returns a list of dictionaries, where each dictionary is a row in the CSV file. type: str dialect: description: - The CSV dialect to use when parsing the CSV file. - Possible values include C(excel), C(excel-tab) or C(unix). type: str default: excel fieldnames: description: - A list of field names for every column. - This is needed if the CSV does not have a header. type: list unique: description: - Whether the C(key) used is expected to be unique. type: bool default: yes delimiter: description: - A one-character string used to separate fields. - When using this parameter, you change the default value used by C(dialect). - The default value depends on the dialect used. type: str skipinitialspace: description: - Whether to ignore any whitespaces immediately following the delimiter. - When using this parameter, you change the default value used by C(dialect). - The default value depends on the dialect used. type: bool strict: description: - Whether to raise an exception on bad CSV input. - When using this parameter, you change the default value used by C(dialect). - The default value depends on the dialect used. type: bool notes: - Ansible also ships with the C(csvfile) lookup plugin, which can be used to do selective lookups in CSV files from Jinja. sΤ # Example CSV file with header # # name,uid,gid # dag,500,500 # jeroen,501,500 # Read a CSV file and access user 'dag' - name: Read users from CSV file and return a dictionary read_csv: path: users.csv key: name register: users delegate_to: localhost - debug: msg: 'User {{ users.dict.dag.name }} has UID {{ users.dict.dag.uid }} and GID {{ users.dict.dag.gid }}' # Read a CSV file and access the first item - name: Read users from CSV file and return a list read_csv: path: users.csv register: users delegate_to: localhost - debug: msg: 'User {{ users.list.1.name }} has UID {{ users.list.1.uid }} and GID {{ users.list.1.gid }}' # Example CSV file without header and semi-colon delimiter # # dag;500;500 # jeroen;501;500 # Read a CSV file without headers - name: Read users from CSV file and return a list read_csv: path: users.csv fieldnames: name,uid,gid delimiter: ';' register: users delegate_to: localhost s„ dict: description: The CSV content as a dictionary. returned: success type: dict sample: dag: name: dag uid: 500 gid: 500 jeroen: name: jeroen uid: 501 gid: 500 list: description: The CSV content as a list. returned: success type: list sample: - name: dag uid: 500 gid: 500 - name: jeroen uid: 501 gid: 500 N(tBytesIOtStringIO(t AnsibleModule(tto_text(tPY3t unix_dialectcB`s5eZdZdZdZeZeZdZ e j Z RS(s:Describe the usual properties of Unix-generated CSV files.t,t"s ( t__name__t __module__t__doc__t delimitert quotechartTruet doublequotetFalsetskipinitialspacetlineterminatortcsvt QUOTE_ALLtquoting(((sB/usr/lib/python2.7/site-packages/ansible/modules/files/read_csv.pyR ™stunixcC`sΎtdtdtdddtddgƒdtddd d ƒd tddƒd tdd ƒdtddd tƒdtddƒdtddƒdtddƒƒdtƒ}|jd}|jd}|jd }|jd }|jd}|tjƒkr|jdd|ƒntd|jdd|jdd|jdƒ}td„|jƒDƒƒ}|r·ytjd||Wn-t k r­}|jddt |ƒƒnXd}ny(t |dƒ} | j ƒ} WdQXWn3t tfk r}|jddt |ƒƒnXtr<t | ddƒ} t| ƒ} n t| ƒ} tj| d |d|ƒ} |r‘|| jkr‘|jdd|dj| jƒfƒntƒ} tƒ}|dkry"x| D]}|j|ƒqΙWWq€tjk r}|jddt |ƒƒq€XnyZxS| D]K}|r^||| kr^|jdd |||fƒn|| ||Εstcustoms#Unable to create custom dialect: %strbsUnable to open file: %sterrorstsurrogate_or_stricts3Key '%s' was not found in the CSV header fields: %ss, sUnable to process file: %ss%Key '%s' is not unique for value '%s'tdict(R R8RtparamsRt list_dialectst fail_jsontitemstregister_dialectt TypeErrorR topentreadtIOErrortOSErrorR R Rt DictReaderR)tjoinR*R0tappendtErrort exit_json(tmoduleRR$R(R)R+tdialect_optionstdialect_paramstetftdatatfake_fhtreadert data_dictt data_listtrow((sB/usr/lib/python2.7/site-packages/ansible/modules/files/read_csv.pytmain¦sr          )    ! !t__main__(t __future__RRRR t __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNRtioRR tansible.module_utils.basicR tansible.module_utils._textR tansible.module_utils.sixR tDialectR R=RSR(((sB/usr/lib/python2.7/site-packages/ansible/modules/files/read_csv.pyts"   <+   N