Skip to content

Commit

Permalink
Fix update check issue in junos_config (ansible#20182)
Browse files Browse the repository at this point in the history
* Fix update check issue in junos_config and required_if enhancement

* Add additional check to update argument which will ensure config
  statement is present.
* Add 'or' condition support in 'required_if'.

* Fix python 2.4 syntax issue

* revert requied_if changes
  • Loading branch information
ganeshrn authored and gundalow committed Jan 25, 2017
1 parent ebfb9ff commit a43534a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ansible/modules/network/junos/junos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ def main():
('update', 'replace')]

required_if = [('replace', True, ['src']),
('update', 'merge', ['src']),
('update', 'overwrite', ['src']),
('update', 'replace', ['src'])]
('update', 'merge', ('src', 'lines')),
('update', 'overwrite', ('src', 'lines')),
('update', 'replace', ('src', 'lines'))]

module = NetworkModule(argument_spec=argument_spec,
mutually_exclusive=mutually_exclusive,
Expand Down

0 comments on commit a43534a

Please sign in to comment.