??????????????
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 Z dd l Z dd l mZmZdd lmZddlmZddlmZmZdefd„ƒYZdefd„ƒYZd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bys lookup: onepassword author: - Scott Buchanan (@scottsb) - Andrew Zenk (@azenk) - Sam Doran (@samdoran) version_added: "2.6" requirements: - C(op) 1Password command line utility. See U(https://support.1password.com/command-line/) short_description: fetch field values from 1Password description: - C(onepassword) wraps the C(op) command line utility to fetch specific field values from 1Password. options: _terms: description: identifier(s) (UUID, name, or subdomain; case-insensitive) of item(s) to retrieve. required: True field: description: field to return from each matching item (case-insensitive). default: 'password' master_password: description: The password used to unlock the specified vault. version_added: '2.7' aliases: ['vault_password'] section: description: Item section containing the field to retrieve (case-insensitive). If absent will return first match from any section. subdomain: description: The 1Password subdomain to authenticate against. version_added: '2.7' username: description: The username used to sign in. version_added: '2.7' secret_key: description: The secret key used when performing an initial sign in. version_added: '2.7' vault: description: Vault containing the item to retrieve (case-insensitive). If absent will search all vaults. notes: - This lookup will use an existing 1Password session if one exists. If not, and you have already performed an initial sign in (meaning C(~/.op/config exists)), then only the C(master_password) is required. You may optionally specify C(subdomain) in this scenario, otherwise the last used subdomain will be used by C(op). - This lookup can perform an initial login by providing C(subdomain), C(username), C(secret_key), and C(master_password). - Due to the B(very) sensitive nature of these credentials, it is B(highly) recommended that you only pass in the minimal credentials needed at any given time. Also, store these credentials in an Ansible Vault using a key that is equal to or greater in strength to the 1Password master password. - This lookup stores potentially sensitive data from 1Password as Ansible facts. Facts are subject to caching if enabled, which means this data could be stored in clear text on disk or in a database. - Tested with C(op) version 0.5.3 s # These examples only work when already signed in to 1Password - name: Retrieve password for KITT when already signed in to 1Password debug: var: lookup('onepassword', 'KITT') - name: Retrieve password for Wintermute when already signed in to 1Password debug: var: lookup('onepassword', 'Tessier-Ashpool', section='Wintermute') - name: Retrieve username for HAL when already signed in to 1Password debug: var: lookup('onepassword', 'HAL 9000', field='username', vault='Discovery') - name: Retrieve password for HAL when not signed in to 1Password debug: var: lookup('onepassword' 'HAL 9000' subdomain='Discovery' master_password=vault_master_password) - name: Retrieve password for HAL when never signed in to 1Password debug: var: lookup('onepassword' 'HAL 9000' subdomain='Discovery' master_password=vault_master_password username='tweety@acme.com' secret_key=vault_secret_key) s/ _raw: description: field data requested N(tPopentPIPE(t LookupBase(tAnsibleLookupError(tto_bytestto_texttOnePasscB`sheZdd„Zd„Zd„Zd d„Zd d d„Zd„Zdd e d„Z d d „Z RS( topcC`sX||_tjjdƒ|_t|_d|_d|_ d|_ d|_ d|_ dS(Ns ~/.op/config( tcli_pathtostpatht expandusertconfig_file_pathtFalset logged_intNonettokent subdomaintusernamet secret_keytmaster_password(tselfR((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyt__init__ss      cC`sภtjj|jƒrฒ|js-tdƒ‚nydddg}|jrZd|jdg}n|j|dt|jƒƒ\}}}|j ƒ|_ Wqผtk rฎ|j ƒqผXn |j ƒdS(Ns<Unable to sign in to 1Password. master_password is required.tsignins --output=rawt command_input( RRtisfileRRR Rt_runR tstripRt full_login(Rtargstrctoutterr((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyt get_token}s   ' cC`sžyV|jddgdtƒ\}}}|dkr?t|_n|jsU|jƒnWnAtk r™}|jtjkrtd|jƒ‚n|‚nXdS(Ntgettaccountt ignore_errorsis@1Password CLI tool '%s' not installed in path on control machine( R"tTrueRR)tOSErrorterrnotENOENTR R(RR&R'R(te((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pytassert_logged_in”s$   cC`svdd|g}|dk r4|dj|ƒg7}n|jsZ|tdƒ|jg7}n|j|ƒ\}}}|S(NR*titems --vault={0}s --session=(RtformatRR RR"(Rtitem_idtvaultR%R&toutputtdummy((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pytget_raw s  cC`s5|j||ƒ}|dkr1|j|||ƒSdS(Nt(R9t _parse_field(RR5tfieldtsectionR6R7((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyt get_fieldฉscC`s d|j|j|j|jgkr3tdƒ‚nddj|jƒt|jƒt|jƒdg}|j|dt|jƒƒ\}}}|j ƒ|_ dS(NsUnable to perform initial sign in to 1Password. subdomain, username, secret_key, and master_password are required to perform initial sign in.Rs{0}.1password.coms --output=rawR ( RRRRRR R4R R"R#R(RR%R&R'R(((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyR$ญs$   'ic C`s‡|jg|}t|dtdtdtƒ}|jd|ƒ\}}|jƒ} | rz| |krztt|ƒƒ‚n| ||fS(Ntstdouttstderrtstdintinput(RRR t communicatetwaitR R ( RR%t expected_rcR R,tcommandtpR'R(R&((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyR"ฝs cC`stj|ƒ}|dkrsxU|djdgƒD]:}|jddƒjƒ|jƒkr2|jddƒSq2Wnx|djdgƒD]…}|dk rพ|jƒ|djƒkrพqŠnxN|jdgƒD]:}|jddƒjƒ|jƒkrั|jd dƒSqัWqŠWdS( NtdetailstfieldstnameR:tvaluetsectionsttitletttv(tjsontloadsRR*tlower(Rt data_jsont field_namet section_titletdatat field_datat section_data((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyR;ฦs $($N( t__name__t __module__RR)R2RR9R>R$RR"R;(((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyRqs    t LookupModulecB`seZdd„ZRS(c K`sัtƒ}|jddƒ}|jdƒ}|jdƒ}|jdƒ|_|jdƒ|_|jdƒ|_|jd|jd ƒƒ|_|jƒg}x-|D]%} |j|j| |||ƒƒqคW|S( NR<tpasswordR=R6RRRRtvault_password( RR*RRRRR2tappendR>( Rttermst variablestkwargsRR<R=R6tvaluestterm((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pytrunืs   #N(RYRZRRd(((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyR[ีs(t __future__RRRttypet __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNR/RPRt subprocessRR tansible.plugins.lookupR tansible.errorsR tansible.module_utils._textR R tobjectRR[(((sF/usr/lib/python2.7/site-packages/ansible/plugins/lookup/onepassword.pyts"  3   d