@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@susemanager
Feature: 0075 - Operate an Ansible control node in a normal minion
Description: * Related GitHub Card: https://github.com/SUSE/spacewalk/issues/30427
File name: min_ansible_control_node.feature
Relative path: secondary/min_ansible_control_node.feature
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@susemanager
Scenario: Pre-requisite: Subscribe SUSE minions to SLE-Module-Python3-15-SP7-Pool for x86_64
Given
I am on the Systems overview page of this "sle_minion"
0s
When
I follow "Software" in the content area
0s
And
I follow "Software Channels" in the content area
0s
And
I check "SLE-Module-Python3-15-SP7-Pool for x86_64" by label
0s
And
I click on "Next"
0s
And
I click on "Confirm"
0s
And
I wait until I see "Changing the channels has been scheduled." text
0s
And
I follow "scheduled"
0s
And
I wait until I see "1 system successfully completed this action" text, refreshing the page
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Enable "Ansible control node" system type
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.516
When
I store the current last event id for "sle_minion"
00:00:01.962
And
I follow "Properties" in the content area
00:00:00.070
And
I check "ansible_control_node"
00:00:00.079
And
I click on "Update Properties"
00:00:02.674
Then
I wait until I see "Ansible Control Node type has been applied." text
00:00:00.096
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Check that the automatic Ansible inventory refresh succeeds
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.552
When
I wait until a new "Refresh Ansible inventories scheduled by (system)" event is completed for "sle_minion"
00:00:03.854
+ Show Error
+ Screenshot
Action 285 failed: uyuni-master-suse-minion.sumaci.aws: 'ansible.targets' is not available. (RuntimeError) ./features/support/commonlib.rb:954:in `block in wait_action_complete' ./features/support/commonlib.rb:100:in `block in repeat_until_timeout' ./features/support/commonlib.rb:89:in `repeat_until_timeout' ./features/support/commonlib.rb:949:in `wait_action_complete' ./features/step_definitions/command_steps.rb:1873:in `/^I wait until a new "([^"]*)" event is completed for "([^"]*)"$/' features/secondary/min_ansible_control_node.feature:39:in `I wait until a new "Refresh Ansible inventories scheduled by (system)" event is completed for "sle_minion"'
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Apply highstate and check that Ansible is installed
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.518
When
I follow "States" in the content area
00:00:00.070
And
I click on "Apply Highstate"
00:00:00.061
And
I wait until event "Apply highstate scheduled" is completed
00:00:39.933
FAIL: rpm -q ansible returned status code = 1. Output: package ansible is not installed (ScriptError) ./features/support/remote_node.rb:172:in `run_local' ./features/support/remote_node.rb:120:in `run' ./features/step_definitions/command_steps.rb:217:in `/^"([^"]*)" should be installed on "([^"]*)"$/' features/secondary/min_ansible_control_node.feature:46:in `"ansible" should be installed on "sle_minion"'
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: The Ansible tab appears in the system overview page
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.583
When
I follow "Ansible" in the content area
00:00:00.077
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.061
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Configure some inventory and playbooks path
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.585
When
I follow "Ansible" in the content area
00:00:00.061
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.060
And
I enter "/srv/playbooks/" as "new_playbook_path_input"
00:00:00.136
And
I click on "new_playbook_path_save"
00:00:00.058
And
I enter "/srv/playbooks/orion_dummy/hosts" as "new_inventory_path_input"
00:00:00.097
And
I click on "new_inventory_path_save"
00:00:00.058
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@bug_reported
Scenario: Display inventories
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.596
When
I follow "Ansible" in the content area
00:00:00.060
And
I follow "Inventories" in the content area
00:00:00.076
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.248
And
I click on the inventory accordion for "/srv/playbooks/orion_dummy/hosts"
00:00:00.048
Then
I wait until I see "myself" text
00:00:02.967
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Discover playbooks and display them
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.542
When
I follow "Ansible" in the content area
00:00:00.058
And
I follow "Playbooks" in the content area
00:00:00.064
And
I wait until I see "/srv/playbooks" text
00:00:00.255
And
I click on "/srv/playbooks"
00:00:00.053
Then
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:01.959
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:00.065
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run a playbook using custom inventory
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.557
When
I follow "Ansible" in the content area
00:00:00.059
And
I follow "Playbooks" in the content area
00:00:00.056
And
I wait until I see "/srv/playbooks" text
00:00:00.251
And
I click on "/srv/playbooks"
00:00:00.049
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:01.946
And
I click on "orion_dummy/playbook_orion_dummy.yml"
00:00:00.060
And
I wait until I see "Playbook Content" text
00:00:00.964
And
I select "/srv/playbooks/orion_dummy/hosts" from "inventory-path-select"
00:00:01.123
And
I click on "Schedule"
00:00:00.072
Then
I should see a "Playbook execution has been scheduled" text
00:00:00.373
And
I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed
00:00:25.662
+ Show Error
+ Show Info
+ Screenshot
unknown error - Event failed (SystemCallError) ./features/step_definitions/navigation_steps.rb:107:in `block (2 levels) in (top (required))' ./features/support/commonlib.rb:100:in `block in repeat_until_timeout' ./features/support/commonlib.rb:89:in `repeat_until_timeout' ./features/step_definitions/navigation_steps.rb:99:in `/^I wait at most (\d+) seconds until the event is completed, refreshing the page$/' ./features/step_definitions/common_steps.rb:157:in `/^I wait (\d+) seconds until the event is picked up and (\d+) seconds until the event "([^"]*)" is completed$/' ./features/step_definitions/common_steps.rb:174:in `/^I wait at most (\d+) seconds until event "([^"]*)" is completed$/' ./features/step_definitions/common_steps.rb:151:in `/^I wait until event "([^"]*)" is completed$/' features/secondary/min_ansible_control_node.feature:92:in `I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed'
Event Details:
module_|-run_ansible_playbook_|-ansible.playbooks_|-run:
name: ansible.playbooks
changes:
ret:
pid: 11948.0
retcode: 4.0
stdout: ''
stderr: |-
[WARNING]: Error loading plugin 'community.general.zypper': No module named 'ansible_collections.community'
[ERROR]: couldn't resolve module/action 'zypper'. This often indicates a misspelling, missing collection, or incorrect module path.
Origin: /srv/playbooks/orion_dummy/playbook_orion_dummy.yml:5:5
3
4 tasks:
5 - name: Install Orion dummy package
^ column 5
comment: Module function ansible.playbooks executed
result: false
__sls__: ansible.runplaybook
__run_num__: 0.0
start_time: '11:29:00.142670'
duration: 2751.162
__id__: run_ansible_playbook
And
file "/tmp/file.txt" should exist on "sle_minion"
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run the basic tests playbook
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.554
When
I follow "Ansible" in the content area
00:00:00.074
And
I follow "Playbooks" in the content area
00:00:00.064
And
I wait until I see "/srv/playbooks" text
00:00:00.254
And
I click on "/srv/playbooks"
00:00:00.056
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.031
And
I click on "basic_tests.yml"
00:00:00.058
And
I wait until I see "Playbook Content" text
00:00:02.212
And
I click on "Schedule"
00:00:00.066
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.458
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.070
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
00:00:43.471
When
I follow "1 system"
00:00:00.289
And
I wait until I see the system name of "sle_minion"
00:00:00.067
And
I follow this "sle_minion" link
00:00:00.439
Text '42' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:112:in `I should see a "42" text'
And
I should see a "101010" text
0s
And
I should see a "(code 0)" text
0s
undefined method `map' for an instance of String (NoMethodError) ./features/support/env.rb:211:in `web_session_is_active?' ./features/support/env.rb:182:in `After'
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run the basic tests playbook while editing variables and changing their values
Requested /rhn/systems/details/Overview.do?sid=1000010020, got https://uyuni-master-server.sumaci.aws/rhn/manager/login?url_bounce=%2Frhn%2Fsystems%2Fdetails%2FOverview.do%3Fsid%3D1000010020&request_method=GET
Unable to find link "Ansible" within #(Capybara::Node::Element tag="section" path="/HTML/BODY[1]/DIV[1]/DIV[1]/SECTION[1]") (Capybara::ElementNotFound) ./features/support/commonlib.rb:193:in `click_link_and_wait' ./features/step_definitions/navigation_steps.rb:366:in `/^I follow "([^"]*)"$/' ./features/step_definitions/navigation_steps.rb:388:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:387:in `/^I follow "([^"]*)" in the (.+)$/' features/secondary/min_ansible_control_node.feature:118:in `I follow "Ansible" in the content area'
And
I follow "Playbooks" in the content area
0s
And
I wait until I see "/srv/playbooks" text
0s
And
I click on "/srv/playbooks"
0s
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
0s
And
I click on "basic_tests.yml"
0s
And
I wait until I see "Playbook Content" text
0s
And
I click on "Edit variables"
0s
And
I enter data from table with value as field name
0s
And
I click on "Save"
0s
And
I click on "Schedule"
0s
And
I wait until I see "Playbook execution has been scheduled" text
0s
And
I wait for "2" seconds
0s
And
I follow "scheduled" in the content area
0s
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
0s
When
I follow "1 system"
0s
And
I wait until I see the system name of "sle_minion"
0s
And
I follow this "sle_minion" link
0s
Then
I should see a "4200" text
0s
And
I should see a "(code 0)" text
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run the basic tests playbook while editing the EMPTY variables and changing their values
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.543
When
I follow "Ansible" in the content area
00:00:00.074
And
I follow "Playbooks" in the content area
00:00:00.066
And
I wait until I see "/srv/playbooks" text
00:00:00.166
And
I click on "/srv/playbooks"
00:00:00.057
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:01.961
And
I click on "basic_tests.yml"
00:00:00.059
And
I wait until I see "Playbook Content" text
00:00:01.007
And
I click on "Edit variables"
00:00:00.090
And
I enter data from table with value as field name
00:00:01.062
And
I click on "Save"
00:00:00.097
And
I click on "Schedule"
00:00:00.072
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.307
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.069
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
00:00:43.535
When
I follow "1 system"
00:00:00.351
And
I wait until I see the system name of "sle_minion"
00:00:00.067
And
I follow this "sle_minion" link
00:00:00.379
Text '42000' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:171:in `I should see a "42000" text'
And
I should see a "4242" text
0s
And
I should see a "(code 0)" text
0s
undefined method `map' for an instance of String (NoMethodError) ./features/support/env.rb:211:in `web_session_is_active?' ./features/support/env.rb:182:in `After'
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@skip_if_github_validation
Scenario: Run the basic tests playbook while editing the NULL variable and changing its value
Requested /rhn/systems/details/Overview.do?sid=1000010020, got https://uyuni-master-server.sumaci.aws/rhn/manager/login?url_bounce=%2Frhn%2Fsystems%2Fdetails%2FOverview.do%3Fsid%3D1000010020&request_method=GET
Unable to find link "Ansible" within #(Capybara::Node::Element tag="section" path="/HTML/BODY[1]/DIV[1]/DIV[1]/SECTION[1]") (Capybara::ElementNotFound) ./features/support/commonlib.rb:193:in `click_link_and_wait' ./features/step_definitions/navigation_steps.rb:366:in `/^I follow "([^"]*)"$/' ./features/step_definitions/navigation_steps.rb:388:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:387:in `/^I follow "([^"]*)" in the (.+)$/' features/secondary/min_ansible_control_node.feature:178:in `I follow "Ansible" in the content area'
And
I follow "Playbooks" in the content area
0s
And
I wait until I see "/srv/playbooks" text
0s
And
I click on "/srv/playbooks"
0s
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
0s
And
I click on "basic_tests.yml"
0s
And
I wait until I see "Playbook Content" text
0s
And
I click on "Edit variables"
0s
And
I enter data from table with value as field name
0s
And
I click on "Save"
0s
And
I click on "Schedule"
0s
And
I wait until I see "Playbook execution has been scheduled" text
0s
And
I wait for "2" seconds
0s
And
I follow "scheduled" in the content area
0s
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
0s
When
I follow "1 system"
0s
And
I wait until I see the system name of "sle_minion"
0s
And
I follow this "sle_minion" link
0s
Then
I should see a "65536" text
0s
And
I should see a "(code 0)" text
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@skip_if_github_validation
Scenario: Run the basic tests playbook on SAVE operation of YAML editor with pre-crafted strings
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.518
When
I follow "Ansible" in the content area
00:00:00.072
And
I follow "Playbooks" in the content area
00:00:00.065
And
I wait until I see "/srv/playbooks" text
00:00:00.155
And
I click on "/srv/playbooks"
00:00:00.056
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:01.868
And
I click on "basic_tests.yml"
00:00:00.060
And
I wait until I see "Playbook Content" text
00:00:01.131
And
I click on "Edit variables"
00:00:00.099
And
I click on "Edit YAML"
00:00:00.074
And
I click on "Save"
00:00:00.092
And
I click on "Schedule"
00:00:00.071
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.304
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.072
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
00:00:43.531
When
I follow "1 system"
00:00:00.293
And
I wait until I see the system name of "sle_minion"
00:00:00.066
And
I follow this "sle_minion" link
00:00:00.386
Then
I should see a "42" text
00:00:00.073
Text '101010' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:229:in `I should see a "101010" text'
And
I should see a "(code 0)" text
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run the basic tests playbook on SAVE operation of YAML editor with safe values
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.508
When
I follow "Ansible" in the content area
00:00:00.076
And
I follow "Playbooks" in the content area
00:00:00.069
And
I wait until I see "/srv/playbooks" text
00:00:00.265
And
I click on "/srv/playbooks"
00:00:00.080
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:01.840
And
I click on "basic_tests.yml"
00:00:00.058
And
I wait until I see "Playbook Content" text
00:00:01.091
And
I click on "Edit variables"
00:00:00.106
And
I enter data from table with value as field name
00:00:00.841
And
I click on "Edit YAML"
00:00:00.061
And
I click on "Save"
00:00:00.101
And
I click on "Schedule"
00:00:00.060
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.458
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.076
Then
I wait until I see "1 system successfully completed this action" text or "1 system failed to complete this action" text, refreshing the page
00:00:43.546
When
I follow "1 system"
00:00:00.274
And
I wait until I see the system name of "sle_minion"
00:00:00.067
And
I follow this "sle_minion" link
00:00:00.371
Text 'abc' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:258:in `I should see a "abc" text'
And
I should see a "def" text
0s
And
I should see a "ghi" text
0s
And
I should see a "jkl" text
0s
And
I should see a "4096" text
0s
And
I should see a "(code 0)" text
0s
undefined method `map' for an instance of String (NoMethodError) ./features/support/env.rb:211:in `web_session_is_active?' ./features/support/env.rb:182:in `After'
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Cleanup: Disable Ansible and remove test playbooks and inventory file
Requested /rhn/systems/details/Overview.do?sid=1000010020, got https://uyuni-master-server.sumaci.aws/rhn/manager/login?url_bounce=%2Frhn%2Fsystems%2Fdetails%2FOverview.do%3Fsid%3D1000010020&request_method=GET
Unable to find link "Properties" within #(Capybara::Node::Element tag="section" path="/HTML/BODY[1]/DIV[1]/DIV[1]/SECTION[1]") (Capybara::ElementNotFound) ./features/support/commonlib.rb:193:in `click_link_and_wait' ./features/step_definitions/navigation_steps.rb:366:in `/^I follow "([^"]*)"$/' ./features/step_definitions/navigation_steps.rb:388:in `block (2 levels) in (top (required))' ./features/step_definitions/navigation_steps.rb:387:in `/^I follow "([^"]*)" in the (.+)$/' features/secondary/min_ansible_control_node.feature:267:in `I follow "Properties" in the content area'
And
I uncheck "ansible_control_node"
0s
And
I click on "Update Properties"
0s
Then
I should see a "System properties changed" text
0s
And
I remove package "orion-dummy" from this "sle_minion" without error control
0s
And
I remove "/tmp/file.txt" from "sle_minion"
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
@susemanager
Scenario: Cleanup: Unsubscribe SUSE minions from SLE-Module-Python3-15-SP7-Pool for x86_64
Given
I am on the Systems overview page of this "sle_minion"
0s
When
I follow "Software" in the content area
0s
And
I follow "Software Channels" in the content area
0s
And
I uncheck "SLE-Module-Python3-15-SP7-Pool for x86_64" by label
0s
And
I click on "Next"
0s
And
I click on "Confirm"
0s
And
I wait until I see "Changing the channels has been scheduled." text
0s
And
I follow "scheduled"
0s
And
I wait until I see "1 system successfully completed this action" text, refreshing the page
0s
@skip_if_github_validation
@scope_ansible
@sle_minion
@bug_reported
Scenario: Cleanup: Apply highstate to disable the minion as an "Ansible control node"
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.684
When
I follow "States" in the content area
00:00:00.074
And
I click on "Apply Highstate"
00:00:00.063
And
I wait until event "Apply highstate scheduled" is completed
00:00:22.378