@scope_ansible
@sle_minion
@bug_reported
@susemanager
@skip_if_github_validation
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
@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
@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.681
When
I follow "Properties" in the content area
00:00:00.082
And
I check "ansible_control_node"
00:00:00.092
And
I click on "Update Properties"
00:00:02.188
Then
I wait until I see "Ansible Control Node type has been applied." text
00:00:00.102
@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.691
When
I follow "States" in the content area
00:00:00.078
And
I click on "Apply Highstate"
00:00:00.063
And
I wait until event "Apply highstate scheduled" is completed
00:00:39.551
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:40:in `"ansible" should be installed on "sle_minion"'
@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.625
When
I follow "Ansible" in the content area
00:00:00.085
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.065
@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.708
When
I follow "Ansible" in the content area
00:00:00.068
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.064
And
I enter "/srv/playbooks/" as "new_playbook_path_input"
00:00:00.148
And
I click on "new_playbook_path_save"
00:00:00.064
And
I enter "/srv/playbooks/orion_dummy/hosts" as "new_inventory_path_input"
00:00:00.111
And
I click on "new_inventory_path_save"
00:00:00.064
@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:03.409
When
I follow "Ansible" in the content area
00:00:00.069
And
I follow "Inventories" in the content area
00:00:00.102
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.254
And
I click on the inventory accordion for "/srv/playbooks/orion_dummy/hosts"
00:00:00.053
Then
I wait until I see "myself" text
00:00:03.548
@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.635
When
I follow "Ansible" in the content area
00:00:00.074
And
I follow "Playbooks" in the content area
00:00:00.072
And
I wait until I see "/srv/playbooks" text
00:00:00.161
And
I click on "/srv/playbooks"
00:00:00.056
Then
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:02.123
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:00.070
@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.693
When
I follow "Ansible" in the content area
00:00:00.065
And
I follow "Playbooks" in the content area
00:00:00.064
And
I wait until I see "/srv/playbooks" text
00:00:00.280
And
I click on "/srv/playbooks"
00:00:00.054
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:02.121
And
I click on "orion_dummy/playbook_orion_dummy.yml"
00:00:00.064
And
I wait until I see "Playbook Content" text
00:00:00.991
And
I select "/srv/playbooks/orion_dummy/hosts" from "inventory-path-select"
00:00:01.139
And
I click on "Schedule"
00:00:00.076
Then
I should see a "Playbook execution has been scheduled" text
00:00:00.370
And
I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed
00:00:25.677
+ 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:86: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: 11974.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: '23:37:04.246216'
duration: 2762.569
__id__: run_ansible_playbook
And
file "/tmp/file.txt" should exist on "sle_minion"
0s
@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.643
When
I follow "Ansible" in the content area
00:00:00.083
And
I follow "Playbooks" in the content area
00:00:00.075
And
I wait until I see "/srv/playbooks" text
00:00:00.259
And
I click on "/srv/playbooks"
00:00:00.062
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.019
And
I click on "basic_tests.yml"
00:00:00.063
And
I wait until I see "Playbook Content" text
00:00:01.066
And
I click on "Schedule"
00:00:00.073
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.492
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.073
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.524
When
I follow "1 system"
00:00:00.299
And
I wait until I see the system name of "sle_minion"
00:00:00.075
And
I follow this "sle_minion" link
00:00:00.535
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:106:in `I should see a "42" text'
And
I should see a "101010" text
0s
And
I should see a "(code 0)" text
0s
@scope_ansible
@sle_minion
@bug_reported
Scenario: Run the basic tests playbook while editing variables and changing their values
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.862
When
I follow "Ansible" in the content area
00:00:00.082
And
I follow "Playbooks" in the content area
00:00:00.071
And
I wait until I see "/srv/playbooks" text
00:00:00.255
And
I click on "/srv/playbooks"
00:00:00.062
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.042
And
I click on "basic_tests.yml"
00:00:00.064
And
I wait until I see "Playbook Content" text
00:00:01.143
And
I click on "Edit variables"
00:00:00.121
And
I enter data from table with value as field name
00:00:00.896
And
I click on "Save"
00:00:00.103
And
I click on "Schedule"
00:00:00.076
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.327
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.075
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.595
When
I follow "1 system"
00:00:00.303
And
I wait until I see the system name of "sle_minion"
00:00:00.069
And
I follow this "sle_minion" link
00:00:00.458
Text '4200' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:135:in `I should see a "4200" text'
And
I should see a "(code 0)" text
0s
@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.659
When
I follow "Ansible" in the content area
00:00:00.086
And
I follow "Playbooks" in the content area
00:00:00.080
And
I wait until I see "/srv/playbooks" text
00:00:00.257
And
I click on "/srv/playbooks"
00:00:00.063
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.071
And
I click on "basic_tests.yml"
00:00:00.065
And
I wait until I see "Playbook Content" text
00:00:01.095
And
I click on "Edit variables"
00:00:00.093
And
I enter data from table with value as field name
00:00:01.167
And
I click on "Save"
00:00:00.104
And
I click on "Schedule"
00:00:00.079
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.483
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.082
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.578
When
I follow "1 system"
00:00:00.312
And
I wait until I see the system name of "sle_minion"
00:00:00.069
And
I follow this "sle_minion" link
00:00:00.461
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:165:in `I should see a "42000" text'
And
I should see a "4242" text
0s
And
I should see a "(code 0)" text
0s
@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
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.750
When
I follow "Ansible" in the content area
00:00:00.081
And
I follow "Playbooks" in the content area
00:00:00.069
And
I wait until I see "/srv/playbooks" text
00:00:00.346
And
I click on "/srv/playbooks"
00:00:00.060
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.116
And
I click on "basic_tests.yml"
00:00:00.063
And
I wait until I see "Playbook Content" text
00:00:01.130
And
I click on "Edit variables"
00:00:00.088
And
I enter data from table with value as field name
00:00:01.038
And
I click on "Save"
00:00:00.102
And
I click on "Schedule"
00:00:00.075
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.330
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.073
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.656
When
I follow "1 system"
00:00:00.364
And
I wait until I see the system name of "sle_minion"
00:00:00.077
And
I follow this "sle_minion" link
00:00:00.448
Text '65536' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_ansible_control_node.feature:198:in `I should see a "65536" text'
And
I should see a "(code 0)" text
0s
@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.604
When
I follow "Ansible" in the content area
00:00:00.081
And
I follow "Playbooks" in the content area
00:00:00.071
And
I wait until I see "/srv/playbooks" text
00:00:00.272
And
I click on "/srv/playbooks"
00:00:00.061
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.058
And
I click on "basic_tests.yml"
00:00:00.064
And
I wait until I see "Playbook Content" text
00:00:01.151
And
I click on "Edit variables"
00:00:00.105
And
I click on "Edit YAML"
00:00:00.072
And
I click on "Save"
00:00:00.104
And
I click on "Schedule"
00:00:00.075
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.309
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.083
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.566
When
I follow "1 system"
00:00:00.297
And
I wait until I see the system name of "sle_minion"
00:00:00.068
And
I follow this "sle_minion" link
00:00:00.464
Then
I should see a "42" text
00:00:00.068
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:223:in `I should see a "101010" text'
And
I should see a "(code 0)" text
0s
@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.806
When
I follow "Ansible" in the content area
00:00:00.084
And
I follow "Playbooks" in the content area
00:00:00.074
And
I wait until I see "/srv/playbooks" text
00:00:00.270
And
I click on "/srv/playbooks"
00:00:00.065
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:02.148
And
I click on "basic_tests.yml"
00:00:00.065
And
I wait until I see "Playbook Content" text
00:00:01.038
And
I click on "Edit variables"
00:00:00.125
And
I enter data from table with value as field name
00:00:00.910
And
I click on "Edit YAML"
00:00:00.074
And
I click on "Save"
00:00:00.100
And
I click on "Schedule"
00:00:00.078
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.303
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.075
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.664
When
I follow "1 system"
00:00:00.293
And
I wait until I see the system name of "sle_minion"
00:00:00.069
And
I follow this "sle_minion" link
00:00:00.468
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:252: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
@scope_ansible
@sle_minion
@bug_reported
Scenario: Cleanup: Disable Ansible and remove test playbooks and inventory file
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.625
When
I follow "Properties" in the content area
00:00:00.084
And
I uncheck "ansible_control_node"
00:00:10.093
And
I click on "Update Properties"
00:00:01.774
Then
I should see a "System properties changed" text
00:00:00.091
And
I remove package "orion-dummy" from this "sle_minion" without error control
00:00:01.480
And
I remove "/tmp/file.txt" from "sle_minion"
00:00:00.457
@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
@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.662
When
I follow "States" in the content area
00:00:00.075
And
I click on "Apply Highstate"
00:00:00.085
And
I wait until event "Apply highstate scheduled" is completed
00:00:23.641