mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
implements missing code to handle before and after arguments (#28612)
fixes #21683
This commit is contained in:
parent
07cd4fda0e
commit
b34cfd03b3
1 changed files with 7 additions and 0 deletions
|
@ -208,8 +208,15 @@ def main():
|
|||
commands = str(candidate).split('\n')
|
||||
|
||||
if commands:
|
||||
if module.params['before']:
|
||||
commands[:0] = module.params['before']
|
||||
|
||||
if module.params['after']:
|
||||
commands.extend(module.params['after'])
|
||||
|
||||
if not module.check_mode:
|
||||
load_config(module, commands)
|
||||
|
||||
result['changed'] = True
|
||||
|
||||
result['updates'] = commands
|
||||
|
|
Loading…
Reference in a new issue