#NEWLINE# def gen_accept( id_ , keysize = 2048 , force = False ) : #NEWLINE# #INDENT# '\n    Generate a key pair then accept the public key. This function returns the\n    key pair in a dict, only the public key is preserved on the master.\n    ' #NEWLINE# ret = gen ( id_ , keysize ) #NEWLINE# acc_path = os . path . join ( __opts__ [ 'pki_dir' ] , 'minions' , id_ ) #NEWLINE# if ( os . path . isfile ( acc_path ) and ( not force ) ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# with salt . utils . fopen ( fp_ , 'w+' ) as fp_ : #NEWLINE# #INDENT# fp_ . write ( ret [ 'pub' ] ) #NEWLINE# #UNINDENT# return ret