From 5f215337c929762627d7f8976dc6078ddd6f7d62 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Wed, 20 Dec 2017 14:05:16 -0500 Subject: [PATCH] Swap how become is specified for ios integration tests (#34107) --- .../targets/ios_banner/tasks/cli.yaml | 4 ++-- .../ios_banner/tests/cli/basic-login.yaml | 6 +++--- .../ios_banner/tests/cli/basic-motd.yaml | 6 +++--- .../ios_banner/tests/cli/basic-no-login.yaml | 3 --- .../targets/ios_command/tasks/cli.yaml | 4 ++-- .../ios_command/tests/cli/bad_operator.yaml | 1 - .../ios_command/tests/cli/contains.yaml | 1 - .../ios_command/tests/cli/invalid.yaml | 2 -- .../targets/ios_command/tests/cli/output.yaml | 2 -- .../ios_command/tests/cli/timeout.yaml | 1 - .../targets/ios_config/tasks/cli.yaml | 4 ++-- .../targets/ios_config/tests/cli/backup.yaml | 2 -- .../ios_config/tests/cli/defaults.yaml | 5 ----- .../targets/ios_config/tests/cli/save.yaml | 6 ------ .../ios_config/tests/cli/src_basic.yaml | 3 --- .../ios_config/tests/cli/src_invalid.yaml | 1 - .../ios_config/tests/cli/src_match_none.yaml | 3 --- .../ios_config/tests/cli/sublevel.yaml | 4 ---- .../ios_config/tests/cli/sublevel_block.yaml | 4 ---- .../ios_config/tests/cli/sublevel_exact.yaml | 4 ---- .../ios_config/tests/cli/sublevel_strict.yaml | 4 ---- .../ios_config/tests/cli/toplevel.yaml | 4 ---- .../ios_config/tests/cli/toplevel_after.yaml | 4 ---- .../ios_config/tests/cli/toplevel_before.yaml | 4 ---- .../tests/cli/toplevel_nonidempotent.yaml | 4 ---- .../targets/ios_facts/tasks/cli.yaml | 4 ++-- .../ios_facts/tests/cli/all_facts.yaml | 1 - .../ios_facts/tests/cli/default_facts.yaml | 1 - .../ios_facts/tests/cli/invalid_subset.yaml | 2 -- .../ios_facts/tests/cli/not_hardware.yaml | 1 - .../targets/ios_interface/tasks/cli.yaml | 4 ++-- .../ios_interface/tests/cli/basic.yaml | 19 ------------------- .../ios_interface/tests/cli/intent.yaml | 11 ----------- .../targets/ios_logging/tasks/cli.yaml | 4 ++-- .../targets/ios_logging/tests/cli/basic.yaml | 11 ----------- .../targets/ios_ping/tasks/cli.yaml | 4 ++-- .../targets/ios_static_route/tasks/cli.yaml | 4 ++-- .../ios_static_route/tests/cli/basic.yaml | 9 --------- .../targets/ios_system/tasks/cli.yaml | 4 ++-- .../ios_system/tests/cli/set_domain_list.yaml | 10 ---------- .../ios_system/tests/cli/set_domain_name.yaml | 4 ---- .../ios_system/tests/cli/set_hostname.yaml | 4 ---- .../tests/cli/set_lookup_source.yaml | 8 -------- .../tests/cli/set_name_servers.yaml | 5 ----- .../targets/ios_user/tasks/cli.yaml | 4 ++-- .../targets/ios_user/tests/cli/auth.yaml | 2 -- .../targets/ios_user/tests/cli/basic.yaml | 6 ------ .../targets/ios_vlan/tasks/cli.yaml | 4 ++-- .../targets/ios_vlan/tests/cli/basic.yaml | 18 ------------------ 49 files changed, 28 insertions(+), 202 deletions(-) diff --git a/test/integration/targets/ios_banner/tasks/cli.yaml b/test/integration/targets/ios_banner/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_banner/tasks/cli.yaml +++ b/test/integration/targets/ios_banner/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_banner/tests/cli/basic-login.yaml b/test/integration/targets/ios_banner/tests/cli/basic-login.yaml index 473694c825..50e412d98a 100644 --- a/test/integration/targets/ios_banner/tests/cli/basic-login.yaml +++ b/test/integration/targets/ios_banner/tests/cli/basic-login.yaml @@ -5,7 +5,7 @@ banner: login state: absent authorize: yes - become: yes + - name: Set login ios_banner: @@ -16,7 +16,7 @@ string state: present authorize: yes - become: yes + register: result - debug: @@ -36,7 +36,7 @@ string state: present authorize: yes - become: yes + register: result - assert: diff --git a/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml b/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml index 1c1dd21386..c1aa3ae829 100644 --- a/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml +++ b/test/integration/targets/ios_banner/tests/cli/basic-motd.yaml @@ -5,7 +5,7 @@ banner: motd state: absent authorize: yes - become: yes + - name: Set motd ios_banner: @@ -16,7 +16,7 @@ string state: present authorize: yes - become: yes + register: result - debug: @@ -36,7 +36,7 @@ string state: present authorize: yes - become: yes + register: result - assert: diff --git a/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml b/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml index f034872f76..69a549c8d4 100644 --- a/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml +++ b/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml @@ -7,14 +7,12 @@ over multiple lines state: present authorize: yes - become: yes - name: remove login ios_banner: banner: login state: absent authorize: yes - become: yes register: result - debug: @@ -30,7 +28,6 @@ banner: login state: absent authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_command/tasks/cli.yaml b/test/integration/targets/ios_command/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_command/tasks/cli.yaml +++ b/test/integration/targets/ios_command/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_command/tests/cli/bad_operator.yaml b/test/integration/targets/ios_command/tests/cli/bad_operator.yaml index 66757a6644..ba3bb84e57 100644 --- a/test/integration/targets/ios_command/tests/cli/bad_operator.yaml +++ b/test/integration/targets/ios_command/tests/cli/bad_operator.yaml @@ -9,7 +9,6 @@ authorize: yes wait_for: - "result[0] contains 'Description: Foo'" - become: yes register: result ignore_errors: yes diff --git a/test/integration/targets/ios_command/tests/cli/contains.yaml b/test/integration/targets/ios_command/tests/cli/contains.yaml index 3ab19fa500..4aaaa0bcb2 100644 --- a/test/integration/targets/ios_command/tests/cli/contains.yaml +++ b/test/integration/targets/ios_command/tests/cli/contains.yaml @@ -10,7 +10,6 @@ wait_for: - "result[0] contains Cisco" - "result[1] contains Loopback888" - become: yes register: result - assert: diff --git a/test/integration/targets/ios_command/tests/cli/invalid.yaml b/test/integration/targets/ios_command/tests/cli/invalid.yaml index b5a63b1e7f..5e22a3dfd3 100644 --- a/test/integration/targets/ios_command/tests/cli/invalid.yaml +++ b/test/integration/targets/ios_command/tests/cli/invalid.yaml @@ -5,7 +5,6 @@ ios_command: commands: show foo authorize: yes - become: yes register: result ignore_errors: yes @@ -19,7 +18,6 @@ - show version - show foo authorize: yes - become: yes register: result ignore_errors: yes diff --git a/test/integration/targets/ios_command/tests/cli/output.yaml b/test/integration/targets/ios_command/tests/cli/output.yaml index 5052625801..f8676c6ae6 100644 --- a/test/integration/targets/ios_command/tests/cli/output.yaml +++ b/test/integration/targets/ios_command/tests/cli/output.yaml @@ -6,7 +6,6 @@ commands: - show version authorize: yes - become: yes register: result - assert: @@ -20,7 +19,6 @@ - show version - show interfaces authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_command/tests/cli/timeout.yaml b/test/integration/targets/ios_command/tests/cli/timeout.yaml index b92882dff9..0672804998 100644 --- a/test/integration/targets/ios_command/tests/cli/timeout.yaml +++ b/test/integration/targets/ios_command/tests/cli/timeout.yaml @@ -8,7 +8,6 @@ authorize: yes wait_for: - "result[0] contains bad_value_string" - become: yes register: result ignore_errors: yes diff --git a/test/integration/targets/ios_config/tasks/cli.yaml b/test/integration/targets/ios_config/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_config/tasks/cli.yaml +++ b/test/integration/targets/ios_config/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_config/tests/cli/backup.yaml b/test/integration/targets/ios_config/tests/cli/backup.yaml index 0ba544c361..2a4ca4f3f1 100644 --- a/test/integration/targets/ios_config/tests/cli/backup.yaml +++ b/test/integration/targets/ios_config/tests/cli/backup.yaml @@ -10,7 +10,6 @@ - interface Loopback999 match: none authorize: yes - become: yes - name: collect any backup files find: @@ -30,7 +29,6 @@ src: basic/config.j2 backup: yes authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_config/tests/cli/defaults.yaml b/test/integration/targets/ios_config/tests/cli/defaults.yaml index 5e62eb74a5..a0543f814e 100644 --- a/test/integration/targets/ios_config/tests/cli/defaults.yaml +++ b/test/integration/targets/ios_config/tests/cli/defaults.yaml @@ -10,14 +10,12 @@ - interface Loopback999 match: none authorize: yes - become: yes - name: configure device with defaults included ios_config: src: defaults/config.j2 defaults: yes authorize: yes - become: yes register: result - debug: var=result @@ -33,7 +31,6 @@ src: defaults/config.j2 defaults: yes authorize: yes - become: yes register: result - debug: var=result @@ -48,7 +45,6 @@ lines: - mac-address-table notification mac-move authorize: yes - become: yes ignore_errors: yes - name: show interfaces brief to ensure deivce goes to valid prompt @@ -56,7 +52,6 @@ commands: - show interfaces authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_config/tests/cli/save.yaml b/test/integration/targets/ios_config/tests/cli/save.yaml index 3242b8b802..90d69b3c81 100644 --- a/test/integration/targets/ios_config/tests/cli/save.yaml +++ b/test/integration/targets/ios_config/tests/cli/save.yaml @@ -10,14 +10,12 @@ - interface Loopback999 match: none authorize: yes - become: yes - name: save config ios_config: save: true authorize: yes - become: yes register: result # FIXME https://github.com/ansible/ansible-modules-core/issues/5008 ignore_errors: true @@ -32,7 +30,6 @@ ios_config: save: true authorize: yes - become: yes register: result # FIXME https://github.com/ansible/ansible-modules-core/issues/5008 ignore_errors: true @@ -44,7 +41,6 @@ - "no ip http server" save_when: modified authorize: yes - become: yes register: result - name: save should always run @@ -54,7 +50,6 @@ - "ip http server" save_when: modified authorize: yes - become: yes register: result - assert: @@ -66,7 +61,6 @@ lines: - "no ip http server" authorize: yes - become: yes register: result - debug: msg="END cli/save.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/src_basic.yaml b/test/integration/targets/ios_config/tests/cli/src_basic.yaml index a8da2a0b4e..7385917c6d 100644 --- a/test/integration/targets/ios_config/tests/cli/src_basic.yaml +++ b/test/integration/targets/ios_config/tests/cli/src_basic.yaml @@ -10,13 +10,11 @@ - interface Loopback999 match: none authorize: yes - become: yes - name: configure device with config ios_config: src: basic/config.j2 authorize: yes - become: yes register: result - name: debug, remove me @@ -33,7 +31,6 @@ ios_config: src: basic/config.j2 authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml b/test/integration/targets/ios_config/tests/cli/src_invalid.yaml index 296a2ee8a8..5934c15eaa 100644 --- a/test/integration/targets/ios_config/tests/cli/src_invalid.yaml +++ b/test/integration/targets/ios_config/tests/cli/src_invalid.yaml @@ -7,7 +7,6 @@ ios_config: src: basic/foobar.j2 authorize: yes - become: yes register: result ignore_errors: yes diff --git a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml b/test/integration/targets/ios_config/tests/cli/src_match_none.yaml index 0b3078c811..bbf28b2741 100644 --- a/test/integration/targets/ios_config/tests/cli/src_match_none.yaml +++ b/test/integration/targets/ios_config/tests/cli/src_match_none.yaml @@ -10,14 +10,12 @@ - interface Loopback999 match: none authorize: yes - become: yes - name: configure device with config ios_config: src: basic/config.j2 match: none authorize: yes - become: yes register: result - assert: @@ -31,7 +29,6 @@ ios_config: src: basic/config.j2 authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_config/tests/cli/sublevel.yaml b/test/integration/targets/ios_config/tests/cli/sublevel.yaml index 06a49e660a..ee3b7884c3 100644 --- a/test/integration/targets/ios_config/tests/cli/sublevel.yaml +++ b/test/integration/targets/ios_config/tests/cli/sublevel.yaml @@ -8,14 +8,12 @@ - 'no ip access-list standard test' match: none authorize: yes - become: yes - name: configure sub level command ios_config: lines: ['permit ip any any log'] parents: ['ip access-list extended test'] authorize: yes - become: yes register: result - assert: @@ -29,7 +27,6 @@ lines: ['permit ip any any log'] parents: ['ip access-list extended test'] authorize: yes - become: yes register: result - assert: @@ -42,6 +39,5 @@ - 'no ip access-list extended test' match: none authorize: yes - become: yes - debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml index f54f4da4ab..e1100e92d2 100644 --- a/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml +++ b/test/integration/targets/ios_config/tests/cli/sublevel_block.yaml @@ -12,7 +12,6 @@ after: ['exit'] authorize: yes match: none - become: yes - name: configure sub level command using block resplace ios_config: @@ -25,7 +24,6 @@ replace: block after: ['exit'] authorize: yes - become: yes register: result - assert: @@ -48,7 +46,6 @@ replace: block after: ['exit'] authorize: yes - become: yes register: result - assert: @@ -61,6 +58,5 @@ - no ip access-list extended test match: none authorize: yes - become: yes - debug: msg="END cli/sublevel_block.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml index c407b8fecc..4eaed4135f 100644 --- a/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml +++ b/test/integration/targets/ios_config/tests/cli/sublevel_exact.yaml @@ -14,7 +14,6 @@ after: exit match: none authorize: yes - become: yes - name: configure sub level command using exact match ios_config: @@ -28,7 +27,6 @@ after: exit match: exact authorize: yes - become: yes register: result - assert: @@ -51,7 +49,6 @@ parents: ip access-list extended test match: exact authorize: yes - become: yes register: result - assert: @@ -64,6 +61,5 @@ - no ip access-list extended test match: none authorize: yes - become: yes - debug: msg="END cli/sublevel_exact.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml index 9a11c3631f..6300fb4bed 100644 --- a/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml +++ b/test/integration/targets/ios_config/tests/cli/sublevel_strict.yaml @@ -13,7 +13,6 @@ before: no ip access-list extended test match: none authorize: yes - become: yes - name: configure sub level command using strict match ios_config: @@ -25,7 +24,6 @@ parents: ip access-list extended test match: strict authorize: yes - become: yes register: result - assert: @@ -42,7 +40,6 @@ after: exit match: strict authorize: yes - become: yes register: result - assert: @@ -60,6 +57,5 @@ lines: no ip access-list extended test match: none authorize: yes - become: yes - debug: msg="END cli/sublevel_strict.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/toplevel.yaml b/test/integration/targets/ios_config/tests/cli/toplevel.yaml index 14fb3df462..f3c9a896c1 100644 --- a/test/integration/targets/ios_config/tests/cli/toplevel.yaml +++ b/test/integration/targets/ios_config/tests/cli/toplevel.yaml @@ -6,13 +6,11 @@ lines: ['hostname {{ shorter_hostname }}'] match: none authorize: yes - become: yes - name: configure top level command ios_config: lines: ['hostname foo'] authorize: yes - become: yes register: result - assert: @@ -24,7 +22,6 @@ ios_config: lines: ['hostname foo'] authorize: yes - become: yes register: result - assert: @@ -36,6 +33,5 @@ lines: ['hostname {{ shorter_hostname }}'] match: none authorize: yes - become: yes - debug: msg="END cli/toplevel.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml index a79ea407d2..a315f75f96 100644 --- a/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml +++ b/test/integration/targets/ios_config/tests/cli/toplevel_after.yaml @@ -8,14 +8,12 @@ - "hostname {{ shorter_hostname }}" match: none authorize: yes - become: yes - name: configure top level command with before ios_config: lines: ['hostname foo'] after: ['snmp-server contact bar'] authorize: yes - become: yes register: result - assert: @@ -29,7 +27,6 @@ lines: ['hostname foo'] after: ['snmp-server contact foo'] authorize: yes - become: yes register: result - assert: @@ -43,6 +40,5 @@ - "hostname {{ shorter_hostname }}" match: none authorize: yes - become: yes - debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml index ee80d7d648..85a4286181 100644 --- a/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml +++ b/test/integration/targets/ios_config/tests/cli/toplevel_before.yaml @@ -8,14 +8,12 @@ - "hostname {{ shorter_hostname }}" match: none authorize: yes - become: yes - name: configure top level command with before ios_config: lines: ['hostname foo'] before: ['snmp-server contact bar'] authorize: yes - become: yes register: result - assert: @@ -29,7 +27,6 @@ lines: ['hostname foo'] before: ['snmp-server contact foo'] authorize: yes - become: yes register: result - assert: @@ -43,6 +40,5 @@ - "hostname {{ shorter_hostname }}" match: none authorize: yes - become: yes - debug: msg="END cli/toplevel_before.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml index 3fed970a8c..facaa9af44 100644 --- a/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml +++ b/test/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml @@ -6,14 +6,12 @@ lines: ['hostname {{ shorter_hostname }}'] match: none authorize: yes - become: yes - name: configure top level command ios_config: lines: ['hostname foo'] match: strict authorize: yes - become: yes register: result - assert: @@ -26,7 +24,6 @@ lines: ['hostname foo'] match: strict authorize: yes - become: yes register: result - assert: @@ -38,6 +35,5 @@ lines: ['hostname {{ shorter_hostname }}'] match: none authorize: yes - become: yes - debug: msg="END cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_facts/tasks/cli.yaml b/test/integration/targets/ios_facts/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_facts/tasks/cli.yaml +++ b/test/integration/targets/ios_facts/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_facts/tests/cli/all_facts.yaml b/test/integration/targets/ios_facts/tests/cli/all_facts.yaml index 2c6dfad3d9..7d87034ea9 100644 --- a/test/integration/targets/ios_facts/tests/cli/all_facts.yaml +++ b/test/integration/targets/ios_facts/tests/cli/all_facts.yaml @@ -7,7 +7,6 @@ gather_subset: - all authorize: yes - become: yes register: result diff --git a/test/integration/targets/ios_facts/tests/cli/default_facts.yaml b/test/integration/targets/ios_facts/tests/cli/default_facts.yaml index 57f456f663..92c7eaf403 100644 --- a/test/integration/targets/ios_facts/tests/cli/default_facts.yaml +++ b/test/integration/targets/ios_facts/tests/cli/default_facts.yaml @@ -5,7 +5,6 @@ - name: test getting default facts ios_facts: authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml b/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml index 0cb0a7c0c0..467bb9a91f 100644 --- a/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml +++ b/test/integration/targets/ios_facts/tests/cli/invalid_subset.yaml @@ -7,7 +7,6 @@ gather_subset: - "foobar" authorize: yes - become: yes register: result ignore_errors: true @@ -31,7 +30,6 @@ - "!hardware" - "hardware" authorize: yes - become: yes register: result ignore_errors: true diff --git a/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml b/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml index ba8e455c6a..b42351b114 100644 --- a/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml +++ b/test/integration/targets/ios_facts/tests/cli/not_hardware.yaml @@ -7,7 +7,6 @@ gather_subset: - "!hardware" authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_interface/tasks/cli.yaml b/test/integration/targets/ios_interface/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_interface/tasks/cli.yaml +++ b/test/integration/targets/ios_interface/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_interface/tests/cli/basic.yaml b/test/integration/targets/ios_interface/tests/cli/basic.yaml index 80ffba2407..7e0ea4f59c 100644 --- a/test/integration/targets/ios_interface/tests/cli/basic.yaml +++ b/test/integration/targets/ios_interface/tests/cli/basic.yaml @@ -5,7 +5,6 @@ ios_command: commands: show version authorize: yes - become: yes register: show_version_result - block: @@ -24,7 +23,6 @@ - no negotiation auto parents: int GigabitEthernet2 authorize: yes - become: yes - name: Set test interface 2 to GigabitEthernet3 as we are on Cisco IOS-XE set_fact: test_interface2=GigabitEthernet3 @@ -34,7 +32,6 @@ - no negotiation auto parents: int GigabitEthernet3 authorize: yes - become: yes when: "'Cisco IOS-XE' in show_version_result.stdout[0]" - name: Configure interface (setup) @@ -45,7 +42,6 @@ mtu: 1800 state: present authorize: yes - become: yes register: result - name: Configure interface @@ -54,7 +50,6 @@ description: test-interface-initial state: present authorize: yes - become: yes register: result - assert: @@ -69,7 +64,6 @@ description: test-interface-initial state: present authorize: yes - become: yes register: result - assert: @@ -83,7 +77,6 @@ mtu: 2000 state: present authorize: yes - become: yes register: result - assert: @@ -100,7 +93,6 @@ mtu: 1800 state: present authorize: yes - become: yes register: result - assert: @@ -115,7 +107,6 @@ name: "{{ test_interface }}" enabled: False authorize: yes - become: yes register: result - assert: @@ -129,7 +120,6 @@ name: "{{ test_interface }}" enabled: True authorize: yes - become: yes register: result - assert: @@ -146,7 +136,6 @@ mtu: 1800 state: present authorize: yes - become: yes register: result - name: Add interface aggregate @@ -157,7 +146,6 @@ speed: 1000 state: present authorize: yes - become: yes register: result - assert: @@ -177,7 +165,6 @@ speed: 1000 state: present authorize: yes - become: yes register: result - assert: @@ -192,7 +179,6 @@ enabled: False state: present authorize: yes - become: yes register: result - assert: @@ -211,7 +197,6 @@ enabled: True state: present authorize: yes - become: yes register: result - assert: @@ -229,7 +214,6 @@ - name: Loopback10 state: absent authorize: yes - become: yes - name: Create loopback interface aggregate ios_interface: @@ -238,7 +222,6 @@ - name: Loopback10 state: present authorize: yes - become: yes register: result - assert: @@ -254,7 +237,6 @@ - name: Loopback10 state: absent authorize: yes - become: yes register: result - assert: @@ -270,7 +252,6 @@ - name: Loopback10 state: absent authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_interface/tests/cli/intent.yaml b/test/integration/targets/ios_interface/tests/cli/intent.yaml index eb3620f2ee..7dec4cf44b 100644 --- a/test/integration/targets/ios_interface/tests/cli/intent.yaml +++ b/test/integration/targets/ios_interface/tests/cli/intent.yaml @@ -5,7 +5,6 @@ ios_command: commands: show version authorize: yes - become: yes register: show_version_result - name: Set test interface to GigabitEthernet0/2 if we are on Cisco IOS @@ -24,7 +23,6 @@ tx_rate: ge(0) rx_rate: ge(0) authorize: yes - become: yes register: result - assert: @@ -38,7 +36,6 @@ tx_rate: gt(0) rx_rate: lt(0) authorize: yes - become: yes ignore_errors: yes register: result @@ -55,7 +52,6 @@ enabled: False state: down authorize: yes - become: yes register: result - assert: @@ -68,7 +64,6 @@ enabled: False authorize: yes state: up - become: yes ignore_errors: yes register: result @@ -82,7 +77,6 @@ commands: - show lldp neighbors authorize: yes - become: yes register: show_lldp_neighbors_result - block: @@ -93,7 +87,6 @@ - port: eth0 host: netdev authorize: yes - become: yes register: result - assert: @@ -107,7 +100,6 @@ - port: dummy_port host: dummy_host authorize: yes - become: yes ignore_errors: yes register: result @@ -125,7 +117,6 @@ enabled: True state: up authorize: yes - become: yes ignore_errors: yes register: result @@ -142,7 +133,6 @@ - port: eth0 host: netdev authorize: yes - become: yes ignore_errors: yes register: result @@ -160,7 +150,6 @@ - port: dummy_port host: dummy_host authorize: yes - become: yes ignore_errors: yes register: result diff --git a/test/integration/targets/ios_logging/tasks/cli.yaml b/test/integration/targets/ios_logging/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_logging/tasks/cli.yaml +++ b/test/integration/targets/ios_logging/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_logging/tests/cli/basic.yaml b/test/integration/targets/ios_logging/tests/cli/basic.yaml index 46f47765c1..4061b279ea 100644 --- a/test/integration/targets/ios_logging/tests/cli/basic.yaml +++ b/test/integration/targets/ios_logging/tests/cli/basic.yaml @@ -6,7 +6,6 @@ name: 172.16.0.1 state: absent authorize: yes - become: yes - name: Remove console ios_logging: @@ -14,7 +13,6 @@ level: warnings state: absent authorize: yes - become: yes - name: Remove buffer ios_logging: @@ -22,7 +20,6 @@ size: 8000 authorize: yes state: absent - become: yes # start tests - name: Set up host logging @@ -32,7 +29,6 @@ facility: local7 state: present authorize: yes - become: yes register: result - assert: @@ -47,7 +43,6 @@ name: 172.16.0.1 state: present authorize: yes - become: yes register: result - assert: @@ -60,7 +55,6 @@ name: 172.16.0.1 state: absent authorize: yes - become: yes register: result - assert: @@ -74,7 +68,6 @@ name: 172.16.0.1 state: absent authorize: yes - become: yes register: result - assert: @@ -87,7 +80,6 @@ level: warnings state: present authorize: yes - become: yes register: result - assert: @@ -100,7 +92,6 @@ dest: buffered size: 8000 authorize: yes - become: yes register: result - assert: @@ -114,7 +105,6 @@ - { dest: console, level: notifications } - { dest: buffered, size: 9000 } authorize: yes - become: yes register: result - assert: @@ -130,7 +120,6 @@ - { dest: buffered, size: 9000 } state: absent authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_ping/tasks/cli.yaml b/test/integration/targets/ios_ping/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_ping/tasks/cli.yaml +++ b/test/integration/targets/ios_ping/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_static_route/tasks/cli.yaml b/test/integration/targets/ios_static_route/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_static_route/tasks/cli.yaml +++ b/test/integration/targets/ios_static_route/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_static_route/tests/cli/basic.yaml b/test/integration/targets/ios_static_route/tests/cli/basic.yaml index 2472b6dde3..5de2c626f5 100644 --- a/test/integration/targets/ios_static_route/tests/cli/basic.yaml +++ b/test/integration/targets/ios_static_route/tests/cli/basic.yaml @@ -6,7 +6,6 @@ next_hop: 10.0.0.8 state: present authorize: yes - become: yes register: result - assert: @@ -21,7 +20,6 @@ next_hop: 10.0.0.8 state: present authorize: yes - become: yes register: result - assert: @@ -36,7 +34,6 @@ admin_distance: 2 state: present authorize: yes - become: yes register: result - assert: @@ -52,7 +49,6 @@ admin_distance: 2 state: present authorize: yes - become: yes register: result - assert: @@ -67,7 +63,6 @@ admin_distance: 2 state: absent authorize: yes - become: yes register: result - assert: @@ -83,7 +78,6 @@ admin_distance: 2 state: absent authorize: yes - become: yes register: result - assert: @@ -97,7 +91,6 @@ - { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 } state: present authorize: yes - become: yes register: result - assert: @@ -113,7 +106,6 @@ - { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 } state: present authorize: yes - become: yes register: result - assert: @@ -129,7 +121,6 @@ - { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 } state: absent authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_system/tasks/cli.yaml b/test/integration/targets/ios_system/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_system/tasks/cli.yaml +++ b/test/integration/targets/ios_system/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml b/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml index 329fdc5d78..259a48a3d9 100644 --- a/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml +++ b/test/integration/targets/ios_system/tests/cli/set_domain_list.yaml @@ -8,7 +8,6 @@ - no ip domain-list redhat.com match: none authorize: yes - become: yes - name: configure domain_search ios_system: @@ -16,7 +15,6 @@ - ansible.com - redhat.com authorize: yes - become: yes register: result - assert: @@ -31,7 +29,6 @@ - ansible.com - redhat.com authorize: yes - become: yes register: result - assert: @@ -43,7 +40,6 @@ domain_search: - ansible.com authorize: yes - become: yes register: result - assert: @@ -56,7 +52,6 @@ domain_search: - ansible.com authorize: yes - become: yes register: result - assert: @@ -69,7 +64,6 @@ - ansible.com - redhat.com authorize: yes - become: yes register: result - assert: @@ -83,7 +77,6 @@ - ansible.com - redhat.com authorize: yes - become: yes register: result - assert: @@ -96,7 +89,6 @@ - ansible.com - eng.ansible.com authorize: yes - become: yes register: result - assert: @@ -112,7 +104,6 @@ - ansible.com - eng.ansible.com authorize: yes - become: yes register: result - assert: @@ -127,6 +118,5 @@ - no ip domain-list eng.ansible.com match: none authorize: yes - become: yes - debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml b/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml index 7b4e939afc..3a16b5d877 100644 --- a/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml +++ b/test/integration/targets/ios_system/tests/cli/set_domain_name.yaml @@ -6,13 +6,11 @@ lines: no ip domain-name match: none authorize: yes - become: yes - name: configure domain_name ios_system: domain_name: eng.ansible.com authorize: yes - become: yes register: result - assert: @@ -23,7 +21,6 @@ ios_system: domain_name: eng.ansible.com authorize: yes - become: yes register: result - assert: @@ -35,6 +32,5 @@ lines: no ip domain-name match: none authorize: yes - become: yes - debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_system/tests/cli/set_hostname.yaml b/test/integration/targets/ios_system/tests/cli/set_hostname.yaml index 0fa4a017fd..596b61b955 100644 --- a/test/integration/targets/ios_system/tests/cli/set_hostname.yaml +++ b/test/integration/targets/ios_system/tests/cli/set_hostname.yaml @@ -6,13 +6,11 @@ lines: hostname switch match: none authorize: yes - become: yes - name: configure hostname ios_system: hostname: foo authorize: yes - become: yes register: result - assert: @@ -23,7 +21,6 @@ ios_system: hostname: foo authorize: yes - become: yes register: result - assert: @@ -35,6 +32,5 @@ lines: "hostname {{ inventory_hostname }}" match: none authorize: yes - become: yes - debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml b/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml index 70edf7e11f..8880aef5db 100644 --- a/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml +++ b/test/integration/targets/ios_system/tests/cli/set_lookup_source.yaml @@ -8,13 +8,11 @@ - vrf definition ansible match: none authorize: yes - become: yes - name: configure lookup_source ios_system: lookup_source: Loopback888 authorize: yes - become: yes register: result - assert: @@ -26,7 +24,6 @@ ios_system: lookup_source: Loopback888 authorize: yes - become: yes register: result - assert: @@ -37,7 +34,6 @@ ios_system: lookup_enabled: False authorize: yes - become: yes register: result - assert: @@ -49,7 +45,6 @@ ios_system: lookup_enabled: True authorize: yes - become: yes register: result - assert: @@ -64,7 +59,6 @@ # vrf: ansible # authorize: yes # provider: "{{ cli }}" -# become: yes # register: result # #- assert: @@ -81,7 +75,6 @@ # vrf: ansible # authorize: yes # provider: "{{ cli }}" -# become: yes # register: result # #- assert: @@ -95,7 +88,6 @@ - no vrf definition ansible match: none authorize: yes - become: yes ignore_errors: yes # FIXME: Not sure why this is failing with msg": "no vrf definition ansible\r\n% IPv4 and IPv6 addresses from all interfaces in VRF ansible have been removed\r\nfoo(config)#", rc:1 diff --git a/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml b/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml index 77c6e82f72..c7a16d7471 100644 --- a/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml +++ b/test/integration/targets/ios_system/tests/cli/set_name_servers.yaml @@ -7,7 +7,6 @@ - no ip name-server match: none authorize: yes - become: yes - name: configure name_servers ios_system: @@ -16,7 +15,6 @@ - 2.2.2.2 - 3.3.3.3 authorize: yes - become: yes register: result - assert: @@ -34,7 +32,6 @@ - 2.2.2.2 - 3.3.3.3 authorize: yes - become: yes register: result - assert: @@ -76,7 +73,6 @@ - 1.1.1.1 - 2.2.2.2 authorize: yes - become: yes register: result - assert: @@ -91,6 +87,5 @@ - no ip name-server match: none authorize: yes - become: yes - debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}" diff --git a/test/integration/targets/ios_user/tasks/cli.yaml b/test/integration/targets/ios_user/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_user/tasks/cli.yaml +++ b/test/integration/targets/ios_user/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_user/tests/cli/auth.yaml b/test/integration/targets/ios_user/tests/cli/auth.yaml index 0144c838eb..27cf9245e7 100644 --- a/test/integration/targets/ios_user/tests/cli/auth.yaml +++ b/test/integration/targets/ios_user/tests/cli/auth.yaml @@ -8,7 +8,6 @@ state: present authorize: yes configured_password: pass123 - become: yes - name: test login expect: @@ -35,7 +34,6 @@ name: auth_user state: absent authorize: yes - become: yes register: result - name: reset connection diff --git a/test/integration/targets/ios_user/tests/cli/basic.yaml b/test/integration/targets/ios_user/tests/cli/basic.yaml index ea1cbe5928..dfc740fc89 100644 --- a/test/integration/targets/ios_user/tests/cli/basic.yaml +++ b/test/integration/targets/ios_user/tests/cli/basic.yaml @@ -7,7 +7,6 @@ - name: ansibletest3 state: absent authorize: yes - become: yes - name: Create user (SetUp) ios_user: @@ -16,7 +15,6 @@ role: network-operator state: present authorize: yes - become: yes register: result - assert: @@ -32,7 +30,6 @@ authorize: yes state: present view: network-admin - become: yes register: result - assert: @@ -47,7 +44,6 @@ role: network-operator state: present authorize: yes - become: yes register: result - assert: @@ -63,7 +59,6 @@ authorize: yes state: present view: network-admin - become: yes register: result - assert: @@ -79,7 +74,6 @@ - name: ansibletest3 state: absent authorize: yes - become: yes register: result - assert: diff --git a/test/integration/targets/ios_vlan/tasks/cli.yaml b/test/integration/targets/ios_vlan/tasks/cli.yaml index a6f7ae0351..3fb2642692 100644 --- a/test/integration/targets/ios_vlan/tasks/cli.yaml +++ b/test/integration/targets/ios_vlan/tasks/cli.yaml @@ -10,13 +10,13 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" + include: "{{ test_case_to_run }} ansible_connection=network_cli ansible_become=yes" with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run - name: run test case (connection=local) - include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no" + include: "{{ test_case_to_run }} ansible_connection=local" with_first_found: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/test/integration/targets/ios_vlan/tests/cli/basic.yaml b/test/integration/targets/ios_vlan/tests/cli/basic.yaml index 9761a98c8a..2f6983355f 100644 --- a/test/integration/targets/ios_vlan/tests/cli/basic.yaml +++ b/test/integration/targets/ios_vlan/tests/cli/basic.yaml @@ -6,7 +6,6 @@ # - no vlan 200 # - no vlan 300 # authorize: yes -# become: yes #- name: setup - remove switchport settings on interfaces used in test # ios_config: @@ -15,7 +14,6 @@ # - no switchport access vlan 100 # authorize: yes # parents: "{{ item }}" -# become: yes # with_items: # - interface GigabitEthernet0/1 # - interface GigabitEthernet0/2 @@ -25,7 +23,6 @@ # vlan_id: 100 # name: test-vlan # authorize: yes -# become: yes # register: result #- assert: @@ -36,7 +33,6 @@ #- name: create vlan(idempotence) # ios_vlan: *create -# become: yes # register: result #- assert: @@ -50,7 +46,6 @@ # - GigabitEthernet0/1 # - GigabitEthernet0/2 # authorize: yes -# become: yes # register: result #- assert: @@ -65,7 +60,6 @@ #- name: Add interfaces to vlan(idempotence) # ios_vlan: *interfaces -# become: yes # register: result #- assert: @@ -78,7 +72,6 @@ # interfaces: # - GigabitEthernet0/1 # authorize: yes -# become: yes # register: result #- assert: @@ -91,7 +84,6 @@ #- name: Remove interface from vlan(idempotence) # ios_vlan: *single_int -# become: yes # register: result #- assert: @@ -103,7 +95,6 @@ # vlan_id: 100 # state: suspend # authorize: yes -# become: yes # register: result #- assert: @@ -117,7 +108,6 @@ # vlan_id: 100 # state: active # authorize: yes -# become: yes # register: result #- assert: @@ -131,7 +121,6 @@ # vlan_id: 100 # authorize: yes # state: absent -# become: yes # register: result #- assert: @@ -141,7 +130,6 @@ #- name: delete vlan(idempotence) # ios_vlan: *delete -# become: yes # register: result #- assert: @@ -154,7 +142,6 @@ # - { vlan_id: 200, name: vlan-200 } # - { vlan_id: 300, name: vlan-300 } # authorize: yes -# become: yes # register: result #- assert: @@ -167,7 +154,6 @@ #- name: create vlans using aggregate(idempotence) # ios_vlan: *create_aggregate -# become: yes # register: result #- assert: @@ -181,7 +167,6 @@ # - { vlan_id: 300, name: vlan-300 } # state: absent # authorize: yes -# become: yes # register: result #- assert: @@ -192,7 +177,6 @@ #- name: delete vlans using aggregate(idempotence) # ios_vlan: *delete_aggregate -# become: yes # register: result #- assert: @@ -206,7 +190,6 @@ # - no vlan 200 # - no vlan 300 # authorize: yes -# become: yes #- name: teardown(part2) # ios_config: @@ -215,7 +198,6 @@ # - no switchport access vlan 100 # authorize: yes # parents: "{{ item }}" -# become: yes # with_items: # - interface GigabitEthernet0/1 # - interface GigabitEthernet0/2