def csr_managed(name, **kwargs):
 old = __salt__['x509.read_csr'](name)
 (file_args, kwargs) = _get_file_args(name, **kwargs)
 file_args['contents'] = __salt__['x509.create_csr'](text=True, **kwargs)
 ret = __states__['file.managed'](**file_args)
 if ret['changes']:
  new = __salt__['x509.read_csr'](file_args['contents'])
  if (old != new):
   ret['changes'] = {'Old': old, 'New': new}
 return ret

def csr_managed ( name , ** kwargs ) : old = __salt__ [ 'x509.read_csr' ] ( name ) ( file_args , kwargs ) = _get_file_args ( name , ** kwargs ) file_args [ 'contents' ] = __salt__ [ 'x509.create_csr' ] ( text = True , ** kwargs ) ret = __states__ [ 'file.managed' ] ( ** file_args ) if ret [ 'changes' ] : new = __salt__ [ 'x509.read_csr' ] ( file_args [ 'contents' ] ) if ( old != new ) : ret [ 'changes' ] = { 'Old' : old , 'New' : new } return ret
manage a certificate signing request name: path to the csr properties: the properties to be added to the certificate request .