diff options
author | GomathiselviS <gomathiselvi@gmail.com> | 2022-04-25 13:55:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 17:55:07 +0000 |
commit | b834c87f13e3ec908bfcd79022404ddf71d6559e (patch) | |
tree | 6f50926fd91bd22dc483a94252cc1a9c525bbdb8 | |
parent | 03c735a5219c52233b385b6835ef684f8b9ccb42 (diff) | |
download | vyos.vyos-b834c87f13e3ec908bfcd79022404ddf71d6559e.tar.gz vyos.vyos-b834c87f13e3ec908bfcd79022404ddf71d6559e.zip |
Add fqcn to ansible_connection to support stable-2.9 (#254)
Add fqcn to ansible_connection to support stable-2.9
Signed-off-by: GomathiselviS gomathiselvi@gmail.com
SUMMARY
strip_prompt argument is supported only in netcommon network_cli . Vyos jobs on stable-2.9 is failing with the following error, as this argument is not supported ansibe/ansible. This PR sets ansible_connection to ansible.netcommon.network_cli, so that the correct module is used.
2022-04-21 21:14:54.059623 | controller | capabilities = Connection(module._socket_path).get_capabilities()
2022-04-21 21:14:54.059626 | controller | File "/tmp/ansible_vyos.vyos.vyos_config_payload_hjioy2__/ansible_vyos.vyos.vyos_config_payload.zip/ansible/module_utils/connection.py", line 190, in __rpc__
2022-04-21 21:14:54.059629 | controller | raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
2022-04-21 21:14:54.059632 | controller | fatal: [vyos]: FAILED! => {
2022-04-21 21:14:54.059635 | controller | "changed": false,
2022-04-21 21:14:54.059638 | controller | "invocation": {
2022-04-21 21:14:54.059641 | controller | "module_args": {
2022-04-21 21:14:54.059644 | controller | "backup": false,
2022-04-21 21:14:54.059647 | controller | "backup_options": null,
2022-04-21 21:14:54.059650 | controller | "comment": "configured by vyos_config",
2022-04-21 21:14:54.059653 | controller | "config": null,
2022-04-21 21:14:54.059656 | controller | "lines": [
2022-04-21 21:14:54.059658 | controller | "delete interfaces ethernet eth1",
2022-04-21 21:14:54.059661 | controller | "delete interfaces ethernet eth2"
2022-04-21 21:14:54.059664 | controller | ],
2022-04-21 21:14:54.059667 | controller | "match": "none",
2022-04-21 21:14:54.059670 | controller | "provider": null,
2022-04-21 21:14:54.059673 | controller | "save": false,
2022-04-21 21:14:54.059676 | controller | "src": null
2022-04-21 21:14:54.059678 | controller | }
2022-04-21 21:14:54.059682 | controller | },
2022-04-21 21:14:54.059685 | controller | "msg": "send() got an unexpected keyword argument 'strip_prompt'"
ISSUE TYPE
Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>
-rw-r--r-- | changelogs/fragments/add_fqcn_ansible_connection.yaml | 3 | ||||
-rw-r--r-- | tests/integration/targets/vyos_smoke/tasks/cli.yaml | 4 | ||||
-rw-r--r-- | tests/integration/targets/vyos_smoke/tests/cli/caching.yaml | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/changelogs/fragments/add_fqcn_ansible_connection.yaml b/changelogs/fragments/add_fqcn_ansible_connection.yaml new file mode 100644 index 0000000..5b6e80c --- /dev/null +++ b/changelogs/fragments/add_fqcn_ansible_connection.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - "change the ansible_connection to ansible.netcommon.network_cli (FQCN)" diff --git a/tests/integration/targets/vyos_smoke/tasks/cli.yaml b/tests/integration/targets/vyos_smoke/tasks/cli.yaml index f580816..cc5f7df 100644 --- a/tests/integration/targets/vyos_smoke/tasks/cli.yaml +++ b/tests/integration/targets/vyos_smoke/tasks/cli.yaml @@ -9,8 +9,8 @@ - name: set test_items set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case with single_user_mode (connection=network_cli) - include: '{{ test_case_to_run }} ansible_connection=network_cli ansible_network_single_user_mode=True' +- name: run test case with single_user_mode (connection=ansible.netcommon.network_cli) + include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli ansible_network_single_user_mode=True' with_items: '{{ test_items }}' loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_smoke/tests/cli/caching.yaml b/tests/integration/targets/vyos_smoke/tests/cli/caching.yaml index 4230bfa..87b93c8 100644 --- a/tests/integration/targets/vyos_smoke/tests/cli/caching.yaml +++ b/tests/integration/targets/vyos_smoke/tests/cli/caching.yaml @@ -82,4 +82,4 @@ always: - name: cleanup vyos.vyos.vyos_config: *rem - when: ansible_connection == "network_cli" and ansible_network_single_user_mode|d(False) + when: ansible_connection == "ansible.netcommon.network_cli" and ansible_network_single_user_mode|d(False) |