0

junos_l2_interface module removes pre-set interface description and I would like it not to. Is there a way, or should I just redo this using junos_config module?

Running Ansible 2.8.1 on JUNOS 14.1X53-D47.3 and using Juniper.junos role and junos_l2_interface module

My task config:

    - name: Setting vlan to interface
      junos_l2_interface:
         name: "{{interface_name}}"
         access_vlan: "{{vlan_name}}"
         unit: "{{unit}}"
         mode: access  

Output:

   changed: [X.X.X.X] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "access_vlan": "vlan622",
            "active": true,
            "aggregate": null,
            "description": null,
            "enhanced_layer": true,
            "filter_input": null,
            "filter_output": null

Description: null removes the preset description

Since I do not include description parameter in module I would like the module to leave the description as it is.

  • 1
    It's invocation `"description": null` of the module. You might want to `"register: result"` and take a look at [diff](https://docs.ansible.com/ansible/latest/modules/junos_l2_interface_module.html#return-values) whether the description has really changed. – Vladimir Botka Jul 04 '19 at 13:51
  • junos_l2_interface is not part of Juniper.Junos roles but comes from core ansible – Nitin Kr Jul 05 '19 at 09:48
  • @VladimirBotka I have checked from the router's side that the description is really gone – Ignas Anfalovas Jul 18 '19 at 06:53

0 Answers0