# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Run playbook 'playbooks/tests_team.yml' with nm as provider] ************* TASK [Gathering Facts] ********************************************************* ok: [sut] TASK [include_tasks] *********************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/tasks/el_repo_setup.yml for sut TASK [Fix CentOS6 Base repo] *************************************************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [include_tasks] *********************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/tasks/enable_epel.yml for sut TASK [Create EPEL 8] *********************************************************** changed: [sut] => { "changed": true, "cmd": [ "yum", "install", "-y", "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm" ], "delta": "0:00:02.678107", "end": "2022-05-25 23:22:00.754715", "rc": 0, "start": "2022-05-25 23:21:58.076608" } STDOUT: Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. Last metadata expiration check: 0:01:14 ago on Wed May 25 23:20:44 2022. epel-release-latest-8.noarch.rpm 396 kB/s | 23 kB 00:00 Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Installing: epel-release noarch 8-15.el8 @commandline 23 k Transaction Summary ================================================================================ Install 1 Package Total size: 23 k Installed size: 32 k Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : epel-release-8-15.el8.noarch 1/1 Running scriptlet: epel-release-8-15.el8.noarch 1/1 Verifying : epel-release-8-15.el8.noarch 1/1 Installed products updated. Installed: epel-release-8-15.el8.noarch Complete! TASK [Enable EPEL 7] *********************************************************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Enable EPEL 8] *********************************************************** changed: [sut] => { "changed": true, "cmd": [ "dnf", "config-manager", "--set-enabled", "epel" ], "delta": "0:00:00.853413", "end": "2022-05-25 23:22:03.598099", "rc": 0, "start": "2022-05-25 23:22:02.744686" } STDOUT: Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. TASK [Enable EPEL 6] *********************************************************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Set network provider to 'nm'] ******************************************** ok: [sut] => { "ansible_facts": { "network_provider": "nm" }, "changed": false } PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* ok: [sut] TASK [Show playbook name] ****************************************************** ok: [sut] => {} MSG: this is: playbooks/tests_team.yml TASK [include_tasks] *********************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/run_test.yml for sut TASK [TEST: Create a team interface without any port attached] ***************** ok: [sut] => {} MSG: ########## Create a team interface without any port attached ########## TASK [Show item] *************************************************************** ok: [sut] => (item=lsr_description) => { "ansible_loop_var": "item", "item": "lsr_description", "lsr_description": "Create a team interface without any port attached" } ok: [sut] => (item=lsr_setup) => { "ansible_loop_var": "item", "item": "lsr_setup", "lsr_setup": [ "tasks/delete_interface.yml", "tasks/assert_device_absent.yml" ] } ok: [sut] => (item=lsr_test) => { "ansible_loop_var": "item", "item": "lsr_test", "lsr_test": [ "tasks/create_team_profile.yml" ] } ok: [sut] => (item=lsr_assert) => { "ansible_loop_var": "item", "item": "lsr_assert", "lsr_assert": [ "tasks/assert_profile_present.yml", "tasks/assert_device_present.yml" ] } ok: [sut] => (item=lsr_assert_when) => { "ansible_loop_var": "item", "item": "lsr_assert_when", "lsr_assert_when": "VARIABLE IS NOT DEFINED!: 'lsr_assert_when' is undefined" } ok: [sut] => (item=lsr_fail_debug) => { "ansible_loop_var": "item", "item": "lsr_fail_debug", "lsr_fail_debug": [ "__network_connections_result" ] } ok: [sut] => (item=lsr_cleanup) => { "ansible_loop_var": "item", "item": "lsr_cleanup", "lsr_cleanup": [ "tasks/cleanup_profile+device.yml" ] } TASK [include_tasks] *********************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/show_interfaces.yml for sut TASK [include] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/get_current_interfaces.yml for sut TASK [Gather current interface info] ******************************************* ok: [sut] => { "changed": false, "cmd": [ "ls", "-1" ], "delta": "0:00:00.003109", "end": "2022-05-25 23:22:15.108286", "rc": 0, "start": "2022-05-25 23:22:15.105177" } STDOUT: eth0 lo TASK [Set current_interfaces] ************************************************** ok: [sut] => { "ansible_facts": { "current_interfaces": [ "eth0", "lo" ] }, "changed": false } TASK [Show current_interfaces] ************************************************* ok: [sut] => {} MSG: current_interfaces: ['eth0', 'lo'] TASK [setup] ******************************************************************* included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/delete_interface.yml for sut included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/assert_device_absent.yml for sut TASK [remove test interface if necessary] ************************************** fatal: [sut]: FAILED! => { "changed": false, "cmd": [ "ip", "link", "del", "team0" ], "delta": "0:00:00.008206", "end": "2022-05-25 23:22:19.171476", "rc": 1, "start": "2022-05-25 23:22:19.163270" } STDERR: Cannot find device "team0" MSG: non-zero return code ...ignoring TASK [include] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/get_interface_stat.yml for sut TASK [Get stat for interface team0] ******************************************** ok: [sut] => { "changed": false, "stat": { "exists": false } } TASK [assert that interface team0 is absent] *********************************** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [test] ******************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/create_team_profile.yml for sut TASK [Include network role] **************************************************** TASK [linux-system-roles.network : Ensure ansible_facts used by role] ********** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/roles/linux-system-roles.network/tasks/set_facts.yml for sut TASK [linux-system-roles.network : Ensure ansible_facts used by role are present] *** ok: [sut] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [linux-system-roles.network : Check which services are running] *********** ok: [sut] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [linux-system-roles.network : Check which packages are installed] ********* ok: [sut] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [linux-system-roles.network : Print network provider] ********************* ok: [sut] => {} MSG: Using network provider: nm TASK [linux-system-roles.network : Install packages] *************************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.network : Restart NetworkManager due to wireless or team interfaces] *** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.network : Enable and start NetworkManager] ************ ok: [sut] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [linux-system-roles.network : Enable and start wpa_supplicant] ************ skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.network : Enable network service] ********************* skipping: [sut] => { "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false } TASK [linux-system-roles.network : Ensure initscripts network file dependency is present] *** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [linux-system-roles.network : Configure networking connection profiles] *** changed: [sut] => { "_invocation": { "module_args": { "__debug_flags": "", "__header": "#\n# Ansible managed\n#\n", "connections": [ { "ip": { "auto6": false, "dhcp4": false }, "name": "team0", "persistent_state": "present", "type": "team" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true } STDERR: [002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850 TASK [linux-system-roles.network : Show stderr messages] *********************** ok: [sut] => { "__network_connections_result.stderr_lines": [ "[002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850" ] } TASK [linux-system-roles.network : Show debug messages] ************************ ok: [sut] => { "__network_connections_result": { "_invocation": { "module_args": { "__debug_flags": "", "__header": "#\n# Ansible managed\n#\n", "connections": [ { "ip": { "auto6": false, "dhcp4": false }, "name": "team0", "persistent_state": "present", "type": "team" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true, "failed": false, "stderr": "[002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850\n", "stderr_lines": [ "[002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850" ] } } TASK [linux-system-roles.network : Re-test connectivity] *********************** ok: [sut] => { "changed": false, "ping": "pong" } TASK [Show result] ************************************************************* ok: [sut] => { "__network_connections_result": { "_invocation": { "module_args": { "__debug_flags": "", "__header": "#\n# Ansible managed\n#\n", "connections": [ { "ip": { "auto6": false, "dhcp4": false }, "name": "team0", "persistent_state": "present", "type": "team" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true, "failed": false, "stderr": "[002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850\n", "stderr_lines": [ "[002] #0, state:None persistent_state:present, 'team0': add connection team0, 1a3288d4-83cf-4d8f-b6c7-49fb542ed850" ] } } TASK [asserts] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/assert_profile_present.yml for sut included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/assert_device_present.yml for sut TASK [include] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/get_profile_stat.yml for sut TASK [Initialize NM profile exist and ansible_managed comment flag] ************ ok: [sut] => { "ansible_facts": { "lsr_net_profile_ansible_managed": false, "lsr_net_profile_exists": false }, "changed": false } TASK [stat profile file] ******************************************************* ok: [sut] => { "changed": false, "stat": { "atime": 1653521001.8979657, "block_size": 4096, "blocks": 8, "ctime": 1653521001.7819679, "dev": 51713, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 566164, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mode": "0644", "mtime": 1653521001.7819679, "nlink": 1, "path": "/etc/sysconfig/network-scripts/ifcfg-team0", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 139, "uid": 0, "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false } } TASK [Set NM profile exist flag based on the profile files] ******************** ok: [sut] => { "ansible_facts": { "lsr_net_profile_exists": true }, "changed": false } TASK [Get NM profile info] ***************************************************** ok: [sut] => { "changed": false, "cmd": "nmcli -f NAME,FILENAME connection show |grep team0 | grep /etc", "delta": "0:00:00.025904", "end": "2022-05-25 23:23:43.366450", "rc": 0, "start": "2022-05-25 23:23:43.340546" } STDOUT: team0 /etc/sysconfig/network-scripts/ifcfg-team0 TASK [Set NM profile exist flag and ansible_managed flag true based on the nmcli output] *** ok: [sut] => { "ansible_facts": { "lsr_net_profile_ansible_managed": true, "lsr_net_profile_exists": true }, "changed": false } TASK [Get the ansible_managed comment in ifcfg-team0] ************************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Verify the ansible_managed comment in ifcfg-team0] *********************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [assert that profile 'team0' is present] ********************************** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [assert that ansible managed comment in 'team0' is present] *************** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [include] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/get_interface_stat.yml for sut TASK [Get stat for interface team0] ******************************************** ok: [sut] => { "changed": false, "stat": { "atime": 1653521001.8022175, "block_size": 4096, "blocks": 0, "ctime": 1653521001.8022175, "dev": 20, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 21058, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": true, "isreg": false, "issock": false, "isuid": false, "lnk_source": "/sys/devices/virtual/net/team0", "lnk_target": "../../devices/virtual/net/team0", "mode": "0777", "mtime": 1653521001.8022175, "nlink": 1, "path": "/sys/class/net/team0", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 0, "uid": 0, "wgrp": true, "woth": true, "writeable": true, "wusr": true, "xgrp": true, "xoth": true, "xusr": true } } TASK [assert that interface team0 is present] ********************************** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [conditional asserts] ***************************************************** TASK [Success in test 'Create a team interface without any port attached'] ***** ok: [sut] => {} MSG: +++++ Success in test 'Create a team interface without any port attached' +++++ TASK [cleanup] ***************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/cleanup_profile+device.yml for sut TASK [Cleanup profile and device] ********************************************** fatal: [sut]: FAILED! => { "changed": false, "cmd": "nmcli con delete team0\nnmcli con load /etc/sysconfig/network-scripts/ifcfg-team0\nrm -f /etc/sysconfig/network-scripts/ifcfg-team0\nip link del team0\n", "delta": "0:00:00.093952", "end": "2022-05-25 23:24:10.719826", "rc": 1, "start": "2022-05-25 23:24:10.625874" } STDOUT: Connection 'team0' (1a3288d4-83cf-4d8f-b6c7-49fb542ed850) successfully deleted. STDERR: Cannot find device "team0" MSG: non-zero return code ...ignoring PLAY RECAP ********************************************************************* sut : ok=50 changed=3 unreachable=0 failed=0 skipped=11 rescued=0 ignored=2 ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- ---^---^---^---^---^---