Browse Source

do try to reset peer endpoint if none given

tags/v0.9
Maximilian Eschenbacher 6 years ago
parent
commit
09a03a17cc
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      _states/wireguard.py

+ 2
- 2
_states/wireguard.py View File

ret['result'] = True ret['result'] = True
return ret return ret


if show.get('endpoint') != endpoint:
if show.get('endpoint') != None and endpoint and show.get('endpoint') != endpoint:
__salt__['wg.set'](interface, peer=name, endpoint=endpoint) __salt__['wg.set'](interface, peer=name, endpoint=endpoint)
ret['changes']['endpoint'] = 'Endpoint changed.'
ret['changes']['endpoint'] = dict(old=show.get('endpoint'), new=endpoint)


if persistent_keepalive and show.get('persistent keepalive', None).startswith('every %s second' % (persistent_keepalive,)): if persistent_keepalive and show.get('persistent keepalive', None).startswith('every %s second' % (persistent_keepalive,)):
__salt__['wg.set'](interface, peer=name, __salt__['wg.set'](interface, peer=name,

Loading…
Cancel
Save