diff --git a/lib/ansible/modules/network/junos/junos_banner.py b/lib/ansible/modules/network/junos/junos_banner.py index f0e9e11bd7..c7c99aafd4 100644 --- a/lib/ansible/modules/network/junos/junos_banner.py +++ b/lib/ansible/modules/network/junos/junos_banner.py @@ -161,7 +161,7 @@ def main(): ele = map_obj_to_ele(module, want, top) with locked_config(module): - diff = load_config(module, tostring(ele), warnings, action='replace') + diff = load_config(module, tostring(ele), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_l3_interface.py b/lib/ansible/modules/network/junos/junos_l3_interface.py index 5f73d5eb29..d5333fb284 100644 --- a/lib/ansible/modules/network/junos/junos_l3_interface.py +++ b/lib/ansible/modules/network/junos/junos_l3_interface.py @@ -184,7 +184,7 @@ def main(): diff = None with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_linkagg.py b/lib/ansible/modules/network/junos/junos_linkagg.py index 21dd33babc..fe3c1c3c79 100644 --- a/lib/ansible/modules/network/junos/junos_linkagg.py +++ b/lib/ansible/modules/network/junos/junos_linkagg.py @@ -327,7 +327,7 @@ def main(): diff = None with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_lldp.py b/lib/ansible/modules/network/junos/junos_lldp.py index 10e71c7efc..7f753295d2 100644 --- a/lib/ansible/modules/network/junos/junos_lldp.py +++ b/lib/ansible/modules/network/junos/junos_lldp.py @@ -184,7 +184,7 @@ def main(): ele = map_obj_to_ele(module, want, top, param=item) with locked_config(module): - diff = load_config(module, tostring(ele), warnings, action='replace') + diff = load_config(module, tostring(ele), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_lldp_interface.py b/lib/ansible/modules/network/junos/junos_lldp_interface.py index 9934aff2a9..2f1d2491fb 100644 --- a/lib/ansible/modules/network/junos/junos_lldp_interface.py +++ b/lib/ansible/modules/network/junos/junos_lldp_interface.py @@ -145,7 +145,7 @@ def main(): ele = map_obj_to_ele(module, want, top, param=item) with locked_config(module): - diff = load_config(module, tostring(ele), warnings, action='replace') + diff = load_config(module, tostring(ele), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_logging.py b/lib/ansible/modules/network/junos/junos_logging.py index d250b6958b..e20a1cf1b0 100644 --- a/lib/ansible/modules/network/junos/junos_logging.py +++ b/lib/ansible/modules/network/junos/junos_logging.py @@ -267,7 +267,7 @@ def main(): diff = None with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_static_route.py b/lib/ansible/modules/network/junos/junos_static_route.py index 11adeeab69..07d5941e5c 100644 --- a/lib/ansible/modules/network/junos/junos_static_route.py +++ b/lib/ansible/modules/network/junos/junos_static_route.py @@ -219,7 +219,7 @@ def main(): with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_system.py b/lib/ansible/modules/network/junos/junos_system.py index 8541114e67..3ae2e6f388 100644 --- a/lib/ansible/modules/network/junos/junos_system.py +++ b/lib/ansible/modules/network/junos/junos_system.py @@ -173,7 +173,7 @@ def main(): ele = map_obj_to_ele(module, want, top) with locked_config(module): - diff = load_config(module, tostring(ele), warnings, action='replace') + diff = load_config(module, tostring(ele), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_user.py b/lib/ansible/modules/network/junos/junos_user.py index 17a481f8f1..8c892f3822 100644 --- a/lib/ansible/modules/network/junos/junos_user.py +++ b/lib/ansible/modules/network/junos/junos_user.py @@ -298,6 +298,8 @@ def main(): kwargs = {} if module.params['purge']: kwargs['action'] = 'replace' + else: + kwargs['action'] = 'merge' with locked_config(module): diff = load_config(module, tostring(ele), warnings, **kwargs) diff --git a/lib/ansible/modules/network/junos/junos_vlan.py b/lib/ansible/modules/network/junos/junos_vlan.py index 7caafea473..2b70afa51f 100644 --- a/lib/ansible/modules/network/junos/junos_vlan.py +++ b/lib/ansible/modules/network/junos/junos_vlan.py @@ -207,7 +207,7 @@ def main(): with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: diff --git a/lib/ansible/modules/network/junos/junos_vrf.py b/lib/ansible/modules/network/junos/junos_vrf.py index 014600610b..38c3e7338a 100644 --- a/lib/ansible/modules/network/junos/junos_vrf.py +++ b/lib/ansible/modules/network/junos/junos_vrf.py @@ -245,7 +245,7 @@ def main(): with locked_config(module): for req in requests: - diff = load_config(module, tostring(req), warnings, action='replace') + diff = load_config(module, tostring(req), warnings, action='merge') commit = not module.check_mode if diff: