summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Nalawade <ganesh634@gmail.com>2017-01-25 20:14:16 +0530
committerJohn R Barker <john@johnrbarker.com>2017-01-25 14:44:16 +0000
commita43534a4a8193bc04b7bdccb9b59e956e180ddf9 (patch)
treeea1d2f26bdb6f9f42166d39cd34797fa5b6b781b
parentebfb9ff3c1781869ff601c2a6e926488cb67230c (diff)
downloadansible-a43534a4a8193bc04b7bdccb9b59e956e180ddf9.tar.gz
Fix update check issue in junos_config (#20182)
* 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
-rw-r--r--lib/ansible/modules/network/junos/junos_config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py
index ddfb806d23..164fb9fada 100644
--- a/lib/ansible/modules/network/junos/junos_config.py
+++ b/lib/ansible/modules/network/junos/junos_config.py
@@ -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,