??????????????
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 m Z d „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zedkrแeƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bysุ --- module: java_cert version_added: '2.3' short_description: Uses keytool to import/remove key from java keystore (cacerts) description: - This is a wrapper module around keytool, which can be used to import/remove certificates from a given java keystore. options: cert_url: description: - Basic URL to fetch SSL certificate from. - One of C(cert_url) or C(cert_path) is required to load certificate. type: str cert_port: description: - Port to connect to URL. - This will be used to create server URL:PORT. type: int default: 443 cert_path: description: - Local path to load certificate from. - One of C(cert_url) or C(cert_path) is required to load certificate. type: path cert_alias: description: - Imported certificate alias. - The alias is used when checking for the presence of a certificate in the keystore. type: str pkcs12_path: description: - Local path to load PKCS12 keystore from. type: path version_added: "2.4" pkcs12_password: description: - Password for importing from PKCS12 keystore. type: str default: '' version_added: "2.4" pkcs12_alias: description: - Alias in the PKCS12 keystore. type: str version_added: "2.4" keystore_path: description: - Path to keystore. type: path keystore_pass: description: - Keystore password. type: str required: true keystore_create: description: - Create keystore if it does not exist. type: bool keystore_type: description: - Keystore type (JCEKS, JKS). type: str version_added: "2.8" executable: description: - Path to keytool binary if not used we search in PATH for it. type: str default: keytool state: description: - Defines action which can be either certificate import or removal. type: str choices: [ absent, present ] default: present author: - Adam Hamsik (@haad) sd - name: Import SSL certificate from google.com to a given cacerts keystore java_cert: cert_url: google.com cert_port: 443 keystore_path: /usr/lib/jvm/jre7/lib/security/cacerts keystore_pass: changeit state: present - name: Remove certificate with given alias from a keystore java_cert: cert_url: google.com keystore_path: /usr/lib/jvm/jre7/lib/security/cacerts keystore_pass: changeit executable: /usr/lib/jvm/jre7/bin/keytool state: absent - name: Import SSL certificate from google.com to a keystore, create it if it doesn't exist java_cert: cert_url: google.com keystore_path: /tmp/cacerts keystore_pass: changeit keystore_create: yes state: present - name: Import a pkcs12 keystore with a specified alias, create it if it doesn't exist java_cert: pkcs12_path: "/tmp/importkeystore.p12" cert_alias: default keystore_path: /opt/wildfly/standalone/configuration/defaultkeystore.jks keystore_pass: changeit keystore_create: yes state: present - name: Import SSL certificate to JCEKS keystore java_cert: pkcs12_path: "/tmp/importkeystore.p12" pkcs12_alias: default pkcs12_password: somepass cert_alias: default keystore_path: /opt/someapp/security/keystore.jceks keystore_type: "JCEKS" keystore_pass: changeit keystore_create: yes state: present sว msg: description: Output from stdout of keytool command after execution of given command. returned: success type: str sample: "Module require existing keystore at keystore_path '/tmp/test/cacerts'" rc: description: Keytool command execution return value. returned: success type: int sample: "0" cmd: description: Executed command to get action done. returned: success type: str sample: "keytool -importcert -noprompt -keystore" N(t AnsibleModulecC`s|rd|SdS(s7 Check that custom keystore is presented in parameters s -storetype '%s't((t keystore_type((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytget_keystore_typeงsc C`sKd||||t|ƒf}|j|ƒ\}}}|dkrGtStS(sY Check if certificate with alias is present in keystore located at keystore_path s@%s -noprompt -list -keystore '%s' -storepass '%s' -alias '%s' %si(R t run_commandtTruetFalse( tmodulet executablet keystore_patht keystore_passtaliasR ttest_cmdtcheck_rct_((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytcheck_cert_presentฎs  c C`sŽtjdƒ}tjdƒ} d} |dk rœ|jdƒ\} } d| | f} | dk rœ| jddƒ} tjdd | ƒ} | d | 7} qœnd || ||f}d ||||t|ƒf}|j|d t ƒ\}}}|j|d|d t ƒ\}}}idd6d|d6}|dkrh|j dt d|d|d|d|d|ƒn"|j d|d|d|d|ƒdS(sD Import certificate from URL into keystore located at keystore_path t https_proxytno_proxyR t:s--J-Dhttps.proxyHost=%s -J-Dhttps.proxyPort=%st,t|s(^|\|)\.s\1*.s -J-Dhttp.nonProxyHosts='%s's&%s -printcert -rfc -sslserver %s %s:%dsF%s -importcert -noprompt -keystore '%s' -storepass '%s' -alias '%s' %sRtdatas tbefores%s tafteritchangedtmsgtrctcmdtstdouttdiffterrorN( tostgetenvtNonetsplittreplacetretsubR R R Rt exit_jsont fail_json(RRturltportRRRR RRt proxy_optst proxy_hostt proxy_porttnon_proxy_hostst fetch_cmdt import_cmdRt fetch_outt import_rct import_outt import_errR%((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytimport_cert_urlบs4     c C`sปd|||||t|ƒf}|j|dtƒ\}} } idd6d|d6} |dkr›|jdtd | d |d |d | d | d| ƒn|jd | d |d |ƒdS(sV Import certificate from path into keystore located on keystore_path as alias sQ%s -importcert -noprompt -keystore '%s' -storepass '%s' -file '%s' -alias '%s' %sRs Rs%s RiR R!R"R#R$R&R%N(R R RR.R R/( RRtpathRRRR R7R9R:R;R%((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytimport_cert_pathๆs   c C`sฤd||||||||t|ƒf } |j| dtƒ\} } } idd6d|d6} | dkrค|jdtd | d | d | d | d | d| ƒn|jd | d | d | ƒdS(sQ Import pkcs12 from path into keystore located on keystore_path as alias sฑ%s -importkeystore -noprompt -destkeystore '%s' -srcstoretype PKCS12 -deststorepass '%s' -destkeypass '%s' -srckeystore '%s' -srcstorepass '%s' -srcalias '%s' -destalias '%s' %sRs Rs%s RiR R!R"R#R$R&R%N(R R RR.R R/(RRR=RRt pkcs12_passt pkcs12_aliasRR R7R9R:R;R%((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytimport_pkcs12_path๛s    c C`sd||||t|ƒf}|j|dtƒ\}}} id|d6d d6} |jdtd|d|d |d |d | d | ƒd S(sI Delete certificate identified with alias from keystore on keystore_path s8%s -delete -keystore '%s' -storepass '%s' -alias '%s' %sRs%s RRR R!R"R#R$R&R%N(R R R R)R.( RRRRRR tdel_cmdtdel_rctdel_outtdel_errR%((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pyt delete_certscC`s|jd|dtƒdS(s/ Test if keytool is actually executable or not s%sRN(R R (RR((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pyt test_keytool scC`s\|dkrd}ntjj|ƒ rXtjj|ƒ rX|jdtdd|ƒndS(s0 Check if we can access keystore as file or not R R R!s6Module require existing keystore at keystore_path '%s'N(R)R'R=texiststisfileR/R(RR((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pyt test_keystore%s  &c"C`sฐtdtddƒdtddƒdtddƒdtdddtƒd tddƒd tddƒd tdd d dƒdtddƒdtdddtdtƒdtddd tƒdtddƒdtddd dƒdtddd ddddgƒƒ }td|ddddggdddggddddggdtƒ}|jjdƒ}|jjdƒ}|jjd ƒ}|jjdƒ}|jjdd ƒ}|jjd d!ƒ}|jjd ƒpั|}|jjdƒ} |jjdƒ} |jjdƒ} |jjdƒ} |jjdƒ} |jjdƒ}|rj| rj|jd"td#d$| ƒnt|| ƒ| st|| ƒnt || | | || ƒ}|dkr๒|r๒|j rึ|j d"tƒnt || | | || ƒnช|dkrœ| rœ|j r!|j d"tƒn|rLt || || | |||| ƒ n|rqt|| || | || ƒn|rœt|| ||| | || ƒqœn|j d"tƒdS(%Ntcert_urlttypetstrt cert_pathR=t pkcs12_pathtpkcs12_passwordtno_logR@t cert_aliast cert_porttinttdefaultiปRRtrequiredtkeystore_createtboolR Rtkeytooltstatetpresenttchoicestabsentt argument_spectrequired_one_oftrequired_togethertmutually_exclusivetsupports_check_modeR t1R R!s8Using local path import from %s requires alias argument.(tdictR RRtparamstgetR/RGRJRt check_modeR.RFRAR>R<(R^RR0R=R1ROR?R@RRRRRWR RRZt cert_present((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pytmain/sv$       t__main__(t __future__RRRRLt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNR'R,tansible.module_utils.basicRR RR<R>RARFRGRJRit__name__(((sD/usr/lib/python2.7/site-packages/ansible/modules/system/java_cert.pyts*   O/    ,     R