Install ncclient even in check mode

When running `kayobe physical network configure --check` against Juniper
switches, Kayobe may fail with the following error:

    Failed to import the required Python library (ncclient)

This is because the ncclient installation task is skipped by check mode.

Change-Id: I643f54a67edfe22a3fd5c86f157bd1246d617399
This commit is contained in:
Pierre Riteau 2023-06-01 16:19:50 +02:00
parent 5cd17d4faf
commit 7b8abfb669
2 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@
name: "ncclient{{ ncclient_version }}"
virtualenv: "{{ lookup('env', 'VIRTUAL_ENV') | default(omit, true) }}"
become: "{{ lookup('env', 'VIRTUAL_ENV') == None }}"
check_mode: false
run_once: true
- name: Ensure Juniper switches are configured

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Installs ``ncclient`` dependency for Juniper switch configuration when
using Ansible check mode.