community.network icon indicating copy to clipboard operation
community.network copied to clipboard

icx_config does not backup the running config

Open sjwk opened this issue 3 years ago • 4 comments

SUMMARY

icx_config doesn't appear to backup the config as documented. Running a task to backup the config should save the file and return a variable saying where and what the file was. Instead it saves nothing and returns the running config as a string inside a variable named backup

ISSUE TYPE
  • Bug Report
COMPONENT NAME

icx_config

ANSIBLE VERSION
ansible 2.10.8
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/keble/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]

CONFIGURATION
ANSIBLE_NOCOWS(/etc/ansible/ansible.cfg) = True
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = ansdeploy
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto

OS / ENVIRONMENT

Ubuntu 18.04 Ruckus ICX 7150 running v08.0.95bcT211

STEPS TO REPRODUCE

Run the below playbook against a Ruckus ICX switch

- hosts: switch
  vars:
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_os: community.network.icx
    ansible_user: ...
    ansible_password:  ...
    ansible_become: yes
    ansible_become_method: enable
    ansible_become_password: ...
  tasks:
    - name: Save Ruckus config
      community.network.icx_config:
        backup: yes
EXPECTED RESULTS

According to documentation, it should save the backup file into the root of the playbook or role directory. It also should return 'backup_path' as a variable to show where it had saved the backup.

ACTUAL RESULTS

As far as I can tell, it's not saving the backup file anywhere. It also doesn't return a backup path, but instead returns the entire config from the switch as a string in a variable named 'backup'.

[WARNING]: packaging Python module unavailable; unable to validate collection
Ansible version requirements

PLAY [switch] ******************************************************************

TASK [Gathering Facts] *********************************************************
ok: [it.switch.hbac]

TASK [Save Ruckus config] ******************************************************
ok: [it.switch.hbac]

PLAY RECAP *********************************************************************
it.switch.hbac             : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

sjwk avatar Apr 27 '21 14:04 sjwk

Same with voss_config. Seems related.

egroeper avatar Jun 14 '21 12:06 egroeper

cc @Commscope @sushma-alethea click here for bot help

ansibullbot avatar Nov 17 '21 19:11 ansibullbot

I'm having the exact same issue as @sjwk using icx_config. The backup operation claims to run successfully, but the backup file is never created and the entire running config text is returned in a variable called "backup".

amosolson avatar Dec 30 '21 23:12 amosolson