diff options
73 files changed, 314 insertions, 228 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a25f48..7fcdf27 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,8 @@ on: # yamllint disable-line rule:truthy workflow_dispatch: jobs: + ansible-lint: + uses: ansible-network/github_actions/.github/workflows/ansible-lint.yml@main changelog: uses: ansible-network/github_actions/.github/workflows/changelog.yml@main sanity: @@ -6,6 +6,8 @@ ignore: | changelogs/* rules: + comments: + min-spaces-from-content: 1 braces: max-spaces-inside: 1 level: error diff --git a/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml b/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml index 8ada933..c5b0d54 100644 --- a/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml +++ b/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml @@ -5,6 +5,6 @@ "set interfaces ethernet eth0 address dhcp\nset interfaces ethernet eth0\ \ speed auto\nset interfaces ethernet eth0 duplex auto\nset interfaces ethernet\ \ eth1\nset interfaces ethernet eth2\ndelete interfaces loopback lo\n" - ignore_errors: true + ignore_errors: true # noqa ignore-errors ansible.netcommon.cli_config: config: "{{ lines }}" diff --git a/tests/integration/targets/vyos_banner/tasks/cli.yaml b/tests/integration/targets/vyos_banner/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_banner/tasks/cli.yaml +++ b/tests/integration/targets/vyos_banner/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_banner/tasks/main.yaml b/tests/integration/targets/vyos_banner/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_banner/tasks/main.yaml +++ b/tests/integration/targets/vyos_banner/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml diff --git a/tests/integration/targets/vyos_bgp_address_family/tasks/cli.yaml b/tests/integration/targets/vyos_bgp_address_family/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_bgp_address_family/tasks/cli.yaml +++ b/tests/integration/targets/vyos_bgp_address_family/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_bgp_address_family/tasks/main.yaml b/tests/integration/targets/vyos_bgp_address_family/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_bgp_address_family/tasks/main.yaml +++ b/tests/integration/targets/vyos_bgp_address_family/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_bgp_global/tasks/cli.yaml b/tests/integration/targets/vyos_bgp_global/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_bgp_global/tasks/cli.yaml +++ b/tests/integration/targets/vyos_bgp_global/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_bgp_global/tasks/main.yaml b/tests/integration/targets/vyos_bgp_global/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_bgp_global/tasks/main.yaml +++ b/tests/integration/targets/vyos_bgp_global/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_command/tasks/cli.yaml b/tests/integration/targets/vyos_command/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_command/tasks/cli.yaml +++ b/tests/integration/targets/vyos_command/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_command/tasks/main.yaml b/tests/integration/targets/vyos_command/tasks/main.yaml index 676b8ec..34f7038 100644 --- a/tests/integration/targets/vyos_command/tasks/main.yaml +++ b/tests/integration/targets/vyos_command/tasks/main.yaml @@ -1,7 +1,9 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_command/tasks/redirection.yaml b/tests/integration/targets/vyos_command/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_command/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_command/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_config/tasks/cli.yaml b/tests/integration/targets/vyos_config/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_config/tasks/cli.yaml +++ b/tests/integration/targets/vyos_config/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_config/tasks/cli_config.yaml b/tests/integration/targets/vyos_config/tasks/cli_config.yaml index 8ed2874..358879b 100644 --- a/tests/integration/targets/vyos_config/tasks/cli_config.yaml +++ b/tests/integration/targets/vyos_config/tasks/cli_config.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli_config test cases - find: +- name: Collect all cli_config test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli_config" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_config/tasks/main.yaml b/tests/integration/targets/vyos_config/tasks/main.yaml index 60fb6bf..46e91e3 100644 --- a/tests/integration/targets/vyos_config/tasks/main.yaml +++ b/tests/integration/targets/vyos_config/tasks/main.yaml @@ -1,11 +1,14 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml -- include: cli_config.yaml +- name: Run cli_config tests + ansible.builtin.include_tasks: cli_config.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_config/tasks/redirection.yaml b/tests/integration/targets/vyos_config/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_config/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_config/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_facts/tasks/cli.yaml b/tests/integration/targets/vyos_facts/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_facts/tasks/cli.yaml +++ b/tests/integration/targets/vyos_facts/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_facts/tasks/main.yaml b/tests/integration/targets/vyos_facts/tasks/main.yaml index 676b8ec..34f7038 100644 --- a/tests/integration/targets/vyos_facts/tasks/main.yaml +++ b/tests/integration/targets/vyos_facts/tasks/main.yaml @@ -1,7 +1,9 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_facts/tasks/redirection.yaml b/tests/integration/targets/vyos_facts/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_facts/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_facts/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_firewall_global/tasks/cli.yaml b/tests/integration/targets/vyos_firewall_global/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_firewall_global/tasks/cli.yaml +++ b/tests/integration/targets/vyos_firewall_global/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_firewall_global/tasks/main.yaml b/tests/integration/targets/vyos_firewall_global/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_firewall_global/tasks/main.yaml +++ b/tests/integration/targets/vyos_firewall_global/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_firewall_global/tasks/redirection.yaml b/tests/integration/targets/vyos_firewall_global/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_firewall_global/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_firewall_global/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_firewall_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_firewall_interfaces/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_firewall_rules/tasks/cli.yaml b/tests/integration/targets/vyos_firewall_rules/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_firewall_rules/tasks/cli.yaml +++ b/tests/integration/targets/vyos_firewall_rules/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_firewall_rules/tasks/main.yaml b/tests/integration/targets/vyos_firewall_rules/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_firewall_rules/tasks/main.yaml +++ b/tests/integration/targets/vyos_firewall_rules/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_hostname/tasks/cli.yaml b/tests/integration/targets/vyos_hostname/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_hostname/tasks/cli.yaml +++ b/tests/integration/targets/vyos_hostname/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_hostname/tasks/main.yaml b/tests/integration/targets/vyos_hostname/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_hostname/tasks/main.yaml +++ b/tests/integration/targets/vyos_hostname/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_interfaces/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_interfaces/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_interfaces/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_interfaces/tasks/redirection.yaml b/tests/integration/targets/vyos_interfaces/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_interfaces/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_interfaces/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_l3_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_l3_interfaces/tasks/cli.yaml index 8aeb46d..56f4907 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_l3_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,11 +8,12 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" delegate_to: localhost - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_l3_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_l3_interfaces/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_l3_interfaces/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_l3_interfaces/tasks/redirection.yaml b/tests/integration/targets/vyos_l3_interfaces/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_l3_interfaces/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_lag_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_lag_interfaces/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_lag_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_lag_interfaces/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_lag_interfaces/tasks/redirection.yaml b/tests/integration/targets/vyos_lag_interfaces/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_lldp_global/tasks/cli.yaml b/tests/integration/targets/vyos_lldp_global/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_lldp_global/tasks/cli.yaml +++ b/tests/integration/targets/vyos_lldp_global/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_lldp_global/tasks/main.yaml b/tests/integration/targets/vyos_lldp_global/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_lldp_global/tasks/main.yaml +++ b/tests/integration/targets/vyos_lldp_global/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_lldp_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_lldp_interfaces/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_lldp_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_lldp_interfaces/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_lldp_interfaces/tasks/redirection.yaml b/tests/integration/targets/vyos_lldp_interfaces/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_logging/tasks/cli.yaml b/tests/integration/targets/vyos_logging/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_logging/tasks/cli.yaml +++ b/tests/integration/targets/vyos_logging/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_logging/tasks/main.yaml b/tests/integration/targets/vyos_logging/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_logging/tasks/main.yaml +++ b/tests/integration/targets/vyos_logging/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml diff --git a/tests/integration/targets/vyos_logging_global/tasks/cli.yaml b/tests/integration/targets/vyos_logging_global/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_logging_global/tasks/cli.yaml +++ b/tests/integration/targets/vyos_logging_global/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_logging_global/tasks/main.yaml b/tests/integration/targets/vyos_logging_global/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_logging_global/tasks/main.yaml +++ b/tests/integration/targets/vyos_logging_global/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_ntp_global/tasks/cli.yaml b/tests/integration/targets/vyos_ntp_global/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_ntp_global/tasks/cli.yaml +++ b/tests/integration/targets/vyos_ntp_global/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_ntp_global/tasks/main.yaml b/tests/integration/targets/vyos_ntp_global/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_ntp_global/tasks/main.yaml +++ b/tests/integration/targets/vyos_ntp_global/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_ospf_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_ospf_interfaces/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_ospfv2/tasks/cli.yaml b/tests/integration/targets/vyos_ospfv2/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_ospfv2/tasks/cli.yaml +++ b/tests/integration/targets/vyos_ospfv2/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_ospfv2/tasks/main.yaml b/tests/integration/targets/vyos_ospfv2/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_ospfv2/tasks/main.yaml +++ b/tests/integration/targets/vyos_ospfv2/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_ospfv2/tasks/redirection.yaml b/tests/integration/targets/vyos_ospfv2/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_ospfv2/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_ospfv2/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml b/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml +++ b/tests/integration/targets/vyos_ospfv3/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_ospfv3/tasks/main.yaml b/tests/integration/targets/vyos_ospfv3/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_ospfv3/tasks/main.yaml +++ b/tests/integration/targets/vyos_ospfv3/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml b/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_ospfv3/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_prefix_lists/tasks/cli.yaml b/tests/integration/targets/vyos_prefix_lists/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_prefix_lists/tasks/cli.yaml +++ b/tests/integration/targets/vyos_prefix_lists/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_prefix_lists/tasks/main.yaml b/tests/integration/targets/vyos_prefix_lists/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_prefix_lists/tasks/main.yaml +++ b/tests/integration/targets/vyos_prefix_lists/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_route_maps/tasks/cli.yaml b/tests/integration/targets/vyos_route_maps/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_route_maps/tasks/cli.yaml +++ b/tests/integration/targets/vyos_route_maps/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_route_maps/tasks/main.yaml b/tests/integration/targets/vyos_route_maps/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_route_maps/tasks/main.yaml +++ b/tests/integration/targets/vyos_route_maps/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_smoke/tasks/cli.yaml b/tests/integration/targets/vyos_smoke/tasks/cli.yaml index d9c9ed7..93f7455 100644 --- a/tests/integration/targets/vyos_smoke/tasks/cli.yaml +++ b/tests/integration/targets/vyos_smoke/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- 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" +- name: Run test case with single_user_mode (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ 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/tasks/main.yaml b/tests/integration/targets/vyos_smoke/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_smoke/tasks/main.yaml +++ b/tests/integration/targets/vyos_smoke/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml diff --git a/tests/integration/targets/vyos_snmp_server/tasks/cli.yaml b/tests/integration/targets/vyos_snmp_server/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_snmp_server/tasks/cli.yaml +++ b/tests/integration/targets/vyos_snmp_server/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_snmp_server/tasks/main.yaml b/tests/integration/targets/vyos_snmp_server/tasks/main.yaml index b957d2f..e637858 100644 --- a/tests/integration/targets/vyos_snmp_server/tasks/main.yaml +++ b/tests/integration/targets/vyos_snmp_server/tasks/main.yaml @@ -1,4 +1,5 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli diff --git a/tests/integration/targets/vyos_static_routes/tasks/cli.yaml b/tests/integration/targets/vyos_static_routes/tasks/cli.yaml index 83496e0..daccf72 100644 --- a/tests/integration/targets/vyos_static_routes/tasks/cli.yaml +++ b/tests/integration/targets/vyos_static_routes/tasks/cli.yaml @@ -1,6 +1,6 @@ --- - name: Collect all cli test cases - find: + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" use_regex: true @@ -8,10 +8,11 @@ delegate_to: localhost - name: Set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }}" + ansible.builtin.include_tasks: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli with_items: "{{ test_items }}" diff --git a/tests/integration/targets/vyos_static_routes/tasks/main.yaml b/tests/integration/targets/vyos_static_routes/tasks/main.yaml index 6b7d046..9a3359e 100644 --- a/tests/integration/targets/vyos_static_routes/tasks/main.yaml +++ b/tests/integration/targets/vyos_static_routes/tasks/main.yaml @@ -1,9 +1,11 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml tags: - network_cli -- include: redirection.yaml +- name: Run redirection CLI tests + ansible.builtin.include_tasks: redirection.yaml when: ansible_version.full is version('2.10.0', '>=') tags: - network_cli diff --git a/tests/integration/targets/vyos_static_routes/tasks/redirection.yaml b/tests/integration/targets/vyos_static_routes/tasks/redirection.yaml index 48ad53a..a368b76 100644 --- a/tests/integration/targets/vyos_static_routes/tasks/redirection.yaml +++ b/tests/integration/targets/vyos_static_routes/tasks/redirection.yaml @@ -1,16 +1,17 @@ --- -- name: collect all redirection cli test cases - find: +- name: Collect all redirection cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/redirection/cli" patterns: "{{ testcase }}.yaml" register: shortname_test_cases delegate_to: localhost -- name: set test_items for redirection - set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}" +- name: Set test_items for redirection + ansible.builtin.set_fact: + test_items: "{{ shortname_test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_system/tasks/cli.yaml b/tests/integration/targets/vyos_system/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_system/tasks/cli.yaml +++ b/tests/integration/targets/vyos_system/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_system/tasks/main.yaml b/tests/integration/targets/vyos_system/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_system/tasks/main.yaml +++ b/tests/integration/targets/vyos_system/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml diff --git a/tests/integration/targets/vyos_user/tasks/cli.yaml b/tests/integration/targets/vyos_user/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_user/tasks/cli.yaml +++ b/tests/integration/targets/vyos_user/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_user/tasks/main.yaml b/tests/integration/targets/vyos_user/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_user/tasks/main.yaml +++ b/tests/integration/targets/vyos_user/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml diff --git a/tests/integration/targets/vyos_vlan/tasks/cli.yaml b/tests/integration/targets/vyos_vlan/tasks/cli.yaml index b2746ce..d06a647 100644 --- a/tests/integration/targets/vyos_vlan/tasks/cli.yaml +++ b/tests/integration/targets/vyos_vlan/tasks/cli.yaml @@ -1,16 +1,17 @@ --- -- name: collect all cli test cases - find: +- name: Collect all cli test cases + ansible.builtin.find: paths: "{{ role_path }}/tests/cli" patterns: "{{ testcase }}.yaml" register: test_cases delegate_to: localhost -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" +- name: Set test_items + ansible.builtin.set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" -- name: run test case (connection=ansible.netcommon.network_cli) - include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" +- name: Run test case (connection=ansible.netcommon.network_cli) + ansible.builtin.include_tasks: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_vlan/tasks/main.yaml b/tests/integration/targets/vyos_vlan/tasks/main.yaml index 07b0f2e..9201bd6 100644 --- a/tests/integration/targets/vyos_vlan/tasks/main.yaml +++ b/tests/integration/targets/vyos_vlan/tasks/main.yaml @@ -1,2 +1,3 @@ --- -- include: cli.yaml +- name: Run CLI tests + ansible.builtin.include_tasks: cli.yaml |