@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:02.103
When
I store the current last event id for "sle_minion"
00:00:02.898
And
I follow "Properties" in the content area
00:00:00.076
And
I check "ansible_control_node"
00:00:00.087
And
I click on "Update Properties"
00:00:01.958
Then
I wait until I see "Ansible Control Node type has been applied." text
00:00:00.094
@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.966
When
I wait until a new "Refresh Ansible inventories scheduled by (system)" event is completed for "sle_minion"
00:00:04.875
+ Show Error
+ Screenshot
Action 265 failed: uyuni-master-suse-minion.sumaci.aws: 'ansible.targets' is not available. (RuntimeError) ./features/support/commonlib.rb:958: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:953: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.839
When
I follow "States" in the content area
00:00:00.077
And
I click on "Apply Highstate"
00:00:00.066
And
I wait until event "Apply highstate scheduled" is completed
00:00:56.572
Then
"ansible" should be installed on "sle_minion"
00:00:00.787
@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.767
When
I follow "Ansible" in the content area
00:00:00.088
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.062
@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.866
When
I follow "Ansible" in the content area
00:00:00.065
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.090
And
I click on "new_playbook_path_save"
00:00:00.063
And
I enter "/srv/playbooks/orion_dummy/hosts" as "new_inventory_path_input"
00:00:00.112
And
I click on "new_inventory_path_save"
00:00:00.066
@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.948
When
I follow "Ansible" in the content area
00:00:00.062
And
I follow "Inventories" in the content area
00:00:00.073
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.270
And
I click on the inventory accordion for "/srv/playbooks/orion_dummy/hosts"
00:00:00.052
Then
I wait until I see "myself" text
00:00:06.094
@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.802
When
I follow "Ansible" in the content area
00:00:00.066
And
I follow "Playbooks" in the content area
00:00:00.075
And
I wait until I see "/srv/playbooks" text
00:00:00.260
And
I click on "/srv/playbooks"
00:00:00.061
Then
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:04.293
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:00.072
@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.809
When
I follow "Ansible" in the content area
00:00:00.070
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
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:04.358
And
I click on "orion_dummy/playbook_orion_dummy.yml"
00:00:00.065
And
I wait until I see "Playbook Content" text
00:00:00.904
And
I select "/srv/playbooks/orion_dummy/hosts" from "inventory-path-select"
00:00:01.136
And
I click on "Schedule"
00:00:00.077
Then
I should see a "Playbook execution has been scheduled" text
00:00:00.380
And
I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed
00:00:23.087
And
file "/tmp/file.txt" should exist on "sle_minion"
00:00:00.711
@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:02.562
When
I follow "Ansible" in the content area
00:00:00.088
And
I follow "Playbooks" in the content area
00:00:00.072
And
I wait until I see "/srv/playbooks" text
00:00:00.265
And
I click on "/srv/playbooks"
00:00:00.063
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.288
And
I click on "basic_tests.yml"
00:00:00.065
And
I wait until I see "Playbook Content" text
00:00:00.969
And
I click on "Schedule"
00:00:00.072
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.316
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.079
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:33.632
When
I follow "1 system"
00:00:00.379
And
I wait until I see the system name of "sle_minion"
00:00:00.070
And
I follow this "sle_minion" link
00:00:00.479
Then
I should see a "42" text
00:00:00.073
And
I should see a "101010" text
00:00:00.070
And
I should see a "(code 0)" text
00:00:00.070
@skip_if_github_validation
@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.857
When
I follow "Ansible" in the content area
00:00:00.084
And
I follow "Playbooks" in the content area
00:00:00.078
And
I wait until I see "/srv/playbooks" text
00:00:00.271
And
I click on "/srv/playbooks"
00:00:00.062
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.208
And
I click on "basic_tests.yml"
00:00:00.068
And
I wait until I see "Playbook Content" text
00:00:01.064
And
I click on "Edit variables"
00:00:00.098
And
I enter data from table with value as field name
00:00:00.931
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.315
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.080
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:33.577
When
I follow "1 system"
00:00:00.308
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.468
Then
I should see a "4200" text
00:00:00.073
And
I should see a "(code 0)" text
00:00:00.072
@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.804
When
I follow "Ansible" in the content area
00:00:00.098
And
I follow "Playbooks" in the content area
00:00:00.075
And
I wait until I see "/srv/playbooks" text
00:00:00.260
And
I click on "/srv/playbooks"
00:00:00.064
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.308
And
I click on "basic_tests.yml"
00:00:00.067
And
I wait until I see "Playbook Content" text
00:00:00.957
And
I click on "Edit variables"
00:00:00.093
And
I enter data from table with value as field name
00:00:01.139
And
I click on "Save"
00:00:00.104
And
I click on "Schedule"
00:00:00.077
And
I wait until I see "Playbook execution has been scheduled" text
00:00:01.028
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.079
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:33.627
When
I follow "1 system"
00:00:00.308
And
I wait until I see the system name of "sle_minion"
00:00:00.070
And
I follow this "sle_minion" link
00:00:00.469
Then
I should see a "42000" text
00:00:00.076
And
I should see a "4242" text
00:00:00.087
And
I should see a "(code 0)" text
00:00:00.070
@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
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.959
When
I follow "Ansible" in the content area
00:00:00.084
And
I follow "Playbooks" in the content area
00:00:00.073
And
I wait until I see "/srv/playbooks" text
00:00:00.267
And
I click on "/srv/playbooks"
00:00:00.061
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.293
And
I click on "basic_tests.yml"
00:00:00.065
And
I wait until I see "Playbook Content" text
00:00:01.042
And
I click on "Edit variables"
00:00:00.097
And
I enter data from table with value as field name
00:00:01.114
And
I click on "Save"
00:00:00.105
And
I click on "Schedule"
00:00:00.074
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.322
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:33.568
When
I follow "1 system"
00:00:00.314
And
I wait until I see the system name of "sle_minion"
00:00:00.072
And
I follow this "sle_minion" link
00:00:00.495
Then
I should see a "65536" text
00:00:00.070
And
I should see a "(code 0)" text
00:00:00.075
@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.812
When
I follow "Ansible" in the content area
00:00:00.084
And
I follow "Playbooks" in the content area
00:00:00.068
And
I wait until I see "/srv/playbooks" text
00:00:00.267
And
I click on "/srv/playbooks"
00:00:00.061
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.233
And
I click on "basic_tests.yml"
00:00:00.064
And
I wait until I see "Playbook Content" text
00:00:00.947
And
I click on "Edit variables"
00:00:00.092
And
I click on "Edit YAML"
00:00:00.072
And
I click on "Save"
00:00:00.097
And
I click on "Schedule"
00:00:00.076
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.321
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:33.635
When
I follow "1 system"
00:00:00.313
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.482
Then
I should see a "42" text
00:00:00.080
And
I should see a "101010" text
00:00:00.073
And
I should see a "(code 0)" text
00:00:00.071
@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.820
When
I follow "Ansible" in the content area
00:00:00.088
And
I follow "Playbooks" in the content area
00:00:00.069
And
I wait until I see "/srv/playbooks" text
00:00:00.348
And
I click on "/srv/playbooks"
00:00:00.061
And
I wait until I see "/srv/playbooks/basic_tests.yml" text
00:00:04.309
And
I click on "basic_tests.yml"
00:00:00.066
And
I wait until I see "Playbook Content" text
00:00:00.961
And
I click on "Edit variables"
00:00:00.091
And
I enter data from table with value as field name
00:00:00.941
And
I click on "Edit YAML"
00:00:00.074
And
I click on "Save"
00:00:00.111
And
I click on "Schedule"
00:00:00.077
And
I wait until I see "Playbook execution has been scheduled" text
00:00:00.315
And
I wait for "2" seconds
00:00:02.000
And
I follow "scheduled" in the content area
00:00:00.079
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:33.614
When
I follow "1 system"
00:00:00.312
And
I wait until I see the system name of "sle_minion"
00:00:00.072
And
I follow this "sle_minion" link
00:00:00.397
Then
I should see a "abc" text
00:00:00.078
And
I should see a "def" text
00:00:00.075
And
I should see a "ghi" text
00:00:00.069
And
I should see a "jkl" text
00:00:00.074
And
I should see a "4096" text
00:00:00.070
And
I should see a "(code 0)" text
00:00:00.075
@skip_if_github_validation
@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:03.136
When
I follow "Properties" in the content area
00:00:00.084
And
I uncheck "ansible_control_node"
00:00:10.078
And
I click on "Update Properties"
00:00:01.781
Then
I should see a "System properties changed" text
00:00:00.098
And
I remove package "orion-dummy" from this "sle_minion" without error control
00:00:02.076
And
I remove "/tmp/file.txt" from "sle_minion"
00:00:00.412
@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.799
When
I follow "States" in the content area
00:00:00.082
And
I click on "Apply Highstate"
00:00:00.065
And
I wait until event "Apply highstate scheduled" is completed
00:00:39.481