Commit Graph

10 Commits

Author SHA1 Message Date
Pierre Riteau 7b8abfb669 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
2023-06-01 16:19:50 +02:00
Mark Goddard 1560bbc8fb Junos switch: update ncclient to 0.6.7+
ncclient 0.6.7 has been released and includes a fix [1] for the host key
checking issue that required us to pin to 0.6.2.

Restrict the package to <0.7.0 to avoid potential breakage from new
releases of ncclient.

[1] ead7b64092

Change-Id: Ia665cffb11253f58bbdce7ea9892766c36f7af40
Story: 2006378
Task: 38765
2020-02-28 09:49:42 +00:00
Zuul d094629926 Merge "Restrict ncclient to 0.6.2 to avoid unknown host key issue" 2019-08-14 19:35:33 +00:00
Mark Goddard 9c9eaf079d Only run ncclient installation task once
It runs on localhost, no need to run for every switch host.

TrivialFix

Change-Id: Ia1576850af29a6f859ce88caee7b71157cbd4474
2019-08-13 16:32:17 +01:00
Mark Goddard 2a17775514 Restrict ncclient to 0.6.2 to avoid unknown host key issue
Juniper physical network device configuration fails when running the
following command:

kayobe physical network configure --group switches

The error is as follows:

fatal: [switch]: FAILED! => {
        "msg": "Unknown host key [<key>] for [[<IP>]:830]"
}

This is due to a bug [1] in ncclient.

This patch avoids the issue by pinning ncclient to version 0.6.2 or
lower.

[1] https://github.com/ncclient/ncclient/issues/302

Change-Id: I7ecd6cd3460bea56d0ab9cb221d0ef5b5ec2d0bb
Story: 2006378
Task: 36174
2019-08-08 14:20:57 +01:00
Mark Goddard e6cf6ca985 Remove tasks for Ansible <= 2.3
The minimum version of ansible is 2.4, so these tasks are no longer
required.

Change-Id: Ied933d18e438955c23ad3eeff80e3377b5633a7c
2018-11-29 15:50:35 +00:00
Will Miller 2d5fd703a0 Reconcile all 'Ansible control host' references
Ensure all references to the Ansible control host are worded as such, to
ensure consistency and avoid potential confusion with the OpenStack
controllers.

Change-Id: Id92e537ccbfdd55287b8eae296f649640c70ce17
2018-07-11 17:19:18 +01:00
Mark Goddard da75d6b734 Use local_action instead of delegate_to in switch config tasks
As of ansible 2.3, it is no longer possible to use delegate_to with a host other
than localhost. Use of a jump host can be enabled via setting ProxyCommand in
ansible_ssh_common_args as for other hosts.
2017-10-12 10:49:13 +00:00
Mark Goddard 1169ce111c Install ncclient python package for junos switches on ansible 2.3+
This package is required on the ansible control host, and is used by the
ansible-connection process to access the switches via a persistent SSH
connection. It must be installed in the kayobe virtual environment.
2017-10-11 16:34:47 +00:00
Mark Goddard da82044a84 Updates to juniper switch configuration
Role renamed to junos-switch. Python dependencies are installed. Support for
multiple configuration types, including 'set', 'text', and 'json'.
2017-08-09 11:35:49 +00:00