diff --git a/docs/release/1.7.md b/docs/release/1.7.md index 4f5afe8a3..4c0a4ab31 100644 --- a/docs/release/1.7.md +++ b/docs/release/1.7.md @@ -88,6 +88,10 @@ For more details, read the [](../dev/validation.md) ## Bug Fixes (bug-fixes-1.7.2)= +### Bug Fixes in Release 1.7.2-post1 + +* **netlab config** command breaks when used with newer Ansible releases. The modified deployment playbook uses the common _deploy custom configuration templates_ task list used by **netlab initial**. + ### Bug Fixes in Release 1.7.2 * Change pinned Vagrant/vagrant-libvirt releases to Vagrant 2.4.0-1 and vagrant-libvirt 0.12.2. Both releases were successfully tested on Ubuntu 20.04 and 22.04 diff --git a/legacy/setup.py b/legacy/setup.py index ed3226834..453d0dad0 100644 --- a/legacy/setup.py +++ b/legacy/setup.py @@ -5,7 +5,7 @@ sys.path.append('..') -version="1.7.2" +version="1.7.2-post1" long_description = (Path(__file__).parent / "README.md").read_text() diff --git a/netsim/__init__.py b/netsim/__init__.py index d09c18e65..2ece6dcda 100755 --- a/netsim/__init__.py +++ b/netsim/__init__.py @@ -2,7 +2,7 @@ import sys -__version__ = "1.7.2" +__version__ = "1.7.2-post1" try: import box diff --git a/netsim/ansible/config.ansible b/netsim/ansible/config.ansible index 8c5a6d59c..0207d03db 100755 --- a/netsim/ansible/config.ansible +++ b/netsim/ansible/config.ansible @@ -6,64 +6,15 @@ gather_facts: false vars: node_provider: "{{ provider|default(netlab_provider) }}" + strategy: "{{ netlab_strategy|default('linear') }}" tasks: - - block: - - set_fact: - netlab_device_type: "{{ netlab_device_type|default(ansible_network_os) }}" - - - fail: msg="Specify configuration template name with an external variable" - when: config is not defined - run_once: true - - - set_fact: - config_template: "{{ lookup('first_found',params,errors='ignore') }}" - vars: - params: - paths: - - "{{ lookup('env','PWD') }}" - - "." - files: - - "{{ config + '/' + inventory_hostname + '.' + netlab_device_type + '-' + node_provider + '.j2' }}" - - "{{ config + '/' + inventory_hostname + '.' + netlab_device_type + '.j2' }}" - - "{{ config + '/' + inventory_hostname + '.j2' }}" - - "{{ config + '/' + netlab_device_type + '-' + node_provider + '.j2' }}" - - "{{ config + '/' + netlab_device_type + '.j2' }}" - - "{{ config + '/' + ansible_network_os + '-' + node_provider + '.j2' }}" - - "{{ config + '/' + ansible_network_os + '.j2' }}" - - "{{ config + '.' + inventory_hostname + '.' + netlab_device_type + '.j2' }}" - - "{{ config + '.' + inventory_hostname + '.' + ansible_network_os + '.j2' }}" - - "{{ config + '.' + inventory_hostname + '.j2' }}" - - "{{ config + '.' + netlab_device_type + '.j2' }}" - - "{{ config + '.' + ansible_network_os + '.j2' }}" - - "{{ config }}" - - "{{ config + '.j2' }}" - - - fail: msg="Cannot find configuration template {{ config }}" - when: config_template == '' - run_once: true - - - debug: - msg: | - Config for {{ inventory_hostname }} - =================================== - {{ lookup('template',config_template) }} - verbosity: 1 - - tags: [ always ] - - - include_tasks: "{{ item }}" - with_first_found: - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy-{{ inventory_hostname }}.yml" - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy.{{ netlab_device_type }}-{{ node_provider }}.yml" - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy.{{ netlab_device_type }}.yml" - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy.{{ ansible_network_os }}-{{ node_provider }}.yml" - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy.{{ ansible_network_os }}.yml" - - "{{ lookup('env','PWD') }}/{{ custom_config }}/deploy.yml" - - "tasks/deploy-config/{{netlab_device_type}}-{{node_provider}}.yml" - - "tasks/deploy-config/{{netlab_device_type}}.yml" - - "tasks/deploy-config/{{ansible_network_os}}.yml" + - fail: msg="Specify configuration template name with an external variable" + when: config is not defined + run_once: true + - set_fact: + netlab_device_type: "{{ netlab_device_type|default(ansible_network_os) }}" + custom_config: "{{ config }}" + - include_tasks: "tasks/deploy-custom-config.yml" args: apply: - vars: - netsim_action: "{{ config }}" - config_template: "{{ config_template }}" + tags: [ always ]