|
|
|
|
|
|
|
|
new=fwmark, |
|
|
new=fwmark, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if private_key == 'auto': |
|
|
|
|
|
private_key = show.get('private key') |
|
|
|
|
|
if private_key is None: |
|
|
|
|
|
private_key = __salt__['wg.genkey']() |
|
|
|
|
|
ret['changes']['private key'] = 'private key generated.' |
|
|
|
|
|
|
|
|
if show.get('private key') != private_key: |
|
|
if show.get('private key') != private_key: |
|
|
__salt__['wg.set'](name, private_key=private_key) |
|
|
__salt__['wg.set'](name, private_key=private_key) |
|
|
ret['changes']['private key'] = 'private key changed.' |
|
|
ret['changes']['private key'] = 'private key changed.' |