mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #50683 from garethgreenaway/48759_adding_aliases_include_expand
[2018.3] Fixes to acme module when adding aliases to existing certificate
This commit is contained in:
commit
b604785c53
1 changed files with 7 additions and 1 deletions
|
@ -169,7 +169,13 @@ def cert(name,
|
|||
res = __salt__['cmd.run_all'](' '.join(cmd))
|
||||
|
||||
if res['retcode'] != 0:
|
||||
return {'result': False, 'comment': 'Certificate {0} renewal failed with:\n{1}'.format(name, res['stderr'])}
|
||||
if 'expand' in res['stderr']:
|
||||
cmd.append('--expand')
|
||||
res = __salt__['cmd.run_all'](' '.join(cmd))
|
||||
if res['retcode'] != 0:
|
||||
return {'result': False, 'comment': 'Certificate {0} renewal failed with:\n{1}'.format(name, res['stderr'])}
|
||||
else:
|
||||
return {'result': False, 'comment': 'Certificate {0} renewal failed with:\n{1}'.format(name, res['stderr'])}
|
||||
|
||||
if 'no action taken' in res['stdout']:
|
||||
comment = 'Certificate {0} unchanged'.format(cert_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue