# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [Run playbook 'playbooks/tests_dummy.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.368843", "end": "2022-05-25 20:29:28.551881", "rc": 0, "start": "2022-05-25 20:29:26.183038" } 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:00:12 ago on Wed May 25 20:29:14 2022. epel-release-latest-8.noarch.rpm 355 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.526862", "end": "2022-05-25 20:29:29.356008", "rc": 0, "start": "2022-05-25 20:29:28.829146" } 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_dummy.yml TASK [include_tasks] *********************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/run_test.yml for sut TASK [TEST: Create a dummy interface] ****************************************** ok: [sut] => {} MSG: ########## Create a dummy interface ########## TASK [Show item] *************************************************************** ok: [sut] => (item=lsr_description) => { "ansible_loop_var": "item", "item": "lsr_description", "lsr_description": "Create a dummy interface" } 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_dummy_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.003076", "end": "2022-05-25 20:29:30.466279", "rc": 0, "start": "2022-05-25 20:29:30.463203" } 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", "dummy0" ], "delta": "0:00:00.008918", "end": "2022-05-25 20:29:30.829278", "rc": 1, "start": "2022-05-25 20:29:30.820360" } STDERR: Cannot find device "dummy0" 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 dummy0] ******************************************* ok: [sut] => { "changed": false, "stat": { "exists": false } } TASK [assert that interface dummy0 is absent] ********************************** ok: [sut] => { "changed": false } MSG: All assertions passed TASK [test] ******************************************************************** included: /WORKDIR/dist-git-network-bond_fix-k5AHLb/tests/playbooks/tasks/create_dummy_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": { "address": [ "192.0.2.42/30" ] }, "name": "dummy0", "state": "up", "type": "dummy" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true } STDERR: [003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df [004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified) TASK [linux-system-roles.network : Show stderr messages] *********************** ok: [sut] => { "__network_connections_result.stderr_lines": [ "[003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df", "[004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified)" ] } 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": { "address": [ "192.0.2.42/30" ] }, "name": "dummy0", "state": "up", "type": "dummy" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true, "failed": false, "stderr": "[003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df\n[004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified)\n", "stderr_lines": [ "[003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df", "[004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified)" ] } } 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": { "address": [ "192.0.2.42/30" ] }, "name": "dummy0", "state": "up", "type": "dummy" } ], "force_state_change": false, "ignore_errors": false, "provider": "nm" } }, "changed": true, "failed": false, "stderr": "[003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df\n[004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified)\n", "stderr_lines": [ "[003] #0, state:up persistent_state:present, 'dummy0': add connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df", "[004] #0, state:up persistent_state:present, 'dummy0': up connection dummy0, 63f026e3-d4c3-4f52-9773-aa480fe815df (is-modified)" ] } } 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": { "exists": false } } TASK [Set NM profile exist flag based on the profile files] ******************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get NM profile info] ***************************************************** ok: [sut] => { "changed": false, "cmd": "nmcli -f NAME,FILENAME connection show |grep dummy0 | grep /etc", "delta": "0:00:00.102276", "end": "2022-05-25 20:29:38.904718", "rc": 0, "start": "2022-05-25 20:29:38.802442" } STDOUT: dummy0 /etc/NetworkManager/system-connections/dummy0.nmconnection 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-dummy0] ************************* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Verify the ansible_managed comment in ifcfg-dummy0] ********************** skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [assert that profile 'dummy0' is present] ********************************* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [assert that ansible managed comment in 'dummy0' 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 dummy0] ******************************************* ok: [sut] => { "changed": false, "stat": { "atime": 1653510577.1470056, "block_size": 4096, "blocks": 0, "ctime": 1653510577.1470056, "dev": 20, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 21099, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": true, "isreg": false, "issock": false, "isuid": false, "lnk_source": "/sys/devices/virtual/net/dummy0", "lnk_target": "../../devices/virtual/net/dummy0", "mode": "0777", "mtime": 1653510577.1470056, "nlink": 1, "path": "/sys/class/net/dummy0", "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 dummy0 is present] ********************************* ok: [sut] => { "changed": false } MSG: All assertions passed TASK [conditional asserts] ***************************************************** TASK [Success in test 'Create a dummy interface'] ****************************** ok: [sut] => {} MSG: +++++ Success in test 'Create a dummy interface' +++++ 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 dummy0\nnmcli con load /etc/sysconfig/network-scripts/ifcfg-dummy0\nrm -f /etc/sysconfig/network-scripts/ifcfg-dummy0\nip link del dummy0\n", "delta": "0:00:00.066781", "end": "2022-05-25 20:29:40.310857", "rc": 1, "start": "2022-05-25 20:29:40.244076" } STDOUT: Connection 'dummy0' (63f026e3-d4c3-4f52-9773-aa480fe815df) successfully deleted. STDERR: Cannot find device "dummy0" MSG: non-zero return code ...ignoring PLAY RECAP ********************************************************************* sut : ok=49 changed=3 unreachable=0 failed=0 skipped=12 rescued=0 ignored=2 ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- ---^---^---^---^---^---