Skip to content

Set commands now failing on junos_install_config #308

@crosson

Description

@crosson

In previous versions of junos_install_config this style of playbook would succeed. This playbook running against an vsrx in eve-ng.

---
- name: Juniper New Out of Box
  hosts: srx
  gather_facts: false
  connection: local

  tasks:
    
  - junos_install_config:
      file: "~/local_ansible/config.set"
      mode: telnet
      user: root
      port: 32781
      host: 10.0.254.1

This now fails under an updated version with the following.
The full traceback is:

Traceback (most recent call last):
  File "/tmp/ansible_8olY8M/ansible_module_junos_install_config.py", line 1127, in <module>
    main()
  File "/tmp/ansible_8olY8M/ansible_module_junos_install_config.py", line 750, in main
    config_format_choices = juniper_junos_common.CONFIG_FORMAT_CHOICES
AttributeError: 'NoneType' object has no attribute 'CONFIG_FORMAT_CHOICES'

fatal: [vsrx]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_8olY8M/ansible_module_junos_install_config.py\", line 1127, in <module>\n    main()\n  File \"/tmp/ansible_8olY8M/ansible_module_junos_install_config.py\", line 750, in main\n    config_format_choices = juniper_junos_common.CONFIG_FORMAT_CHOICES\nAttributeError: 'NoneType' object has no attribute 'CONFIG_FORMAT_CHOICES'\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}

Reading the juniper_junos_config.py file shows updates in what arguments are expected. I have tried interpreting this and changed the playbook as:

  - junos_install_config:
      load: "override"
      src: "config.set"
      format: "set"
      mode: 'telnet'
      user: root
      port: 32781
      host: 10.0.254.1

Yet the same error persists. It would be nice to get some direction this. Thanks team!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions