@scope_ansible
@scope_salt_ssh
@ssh_minion
@susemanager
Feature: 0125 - Operate an Ansible control node in SSH minion
File name: minssh_ansible_control_node.feature
Relative path: secondary/minssh_ansible_control_node.feature
@scope_ansible
@scope_salt_ssh
@ssh_minion
@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 "ssh_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
@scope_salt_ssh
@ssh_minion
Scenario: Enable "Ansible control node" system type
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.833
When
I follow "Properties" in the content area
00:00:00.067
And
I check "ansible_control_node"
00:00:00.080
And
I click on "Update Properties"
00:00:01.417
Then
I wait until I see "Ansible Control Node type has been applied." text
00:00:00.092
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Apply highstate and check that Ansible is installed
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.649
When
I follow "States" in the content area
00:00:00.068
And
I click on "Apply Highstate"
00:00:00.057
And
I wait until event "Apply highstate scheduled" is completed
00:01:11.495
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/minssh_ansible_control_node.feature:39:in `"ansible" should be installed on "ssh_minion"'
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: The Ansible tab appears in the system overview page
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.521
When
I follow "Ansible" in the content area
00:00:00.075
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.061
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Configure some inventory and playbooks path
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.553
When
I follow "Ansible" in the content area
00:00:00.060
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.362
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.098
And
I click on "new_inventory_path_save"
00:00:00.058
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.842
When
I follow "Ansible" in the content area
00:00:00.059
And
I follow "Inventories" in the content area
00:00:00.062
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.237
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:17.536
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Discover playbooks and display them
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.511
When
I follow "Ansible" in the content area
00:00:00.080
And
I follow "Playbooks" in the content area
00:00:00.062
And
I wait until I see "/srv/playbooks" text
00:00:00.240
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:07.450
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Run a playbook using custom inventory
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.591
When
I follow "Ansible" in the content area
00:00:00.063
And
I follow "Playbooks" in the content area
00:00:00.079
And
I wait until I see "/srv/playbooks" text
00:00:00.248
And
I click on "/srv/playbooks"
00:00:00.048
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:00:06.981
And
I click on "orion_dummy/playbook_orion_dummy.yml"
00:00:00.061
And
I wait until I see "Playbook Content" text
00:00:06.822
And
I select "/srv/playbooks/orion_dummy/hosts" from "inventory-path-select"
00:00:01.129
And
I click on "Schedule"
00:00:00.069
Then
I should see a "Playbook execution has been scheduled" text
00:00:00.378
And
I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed
00:00:41.536
+ 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/minssh_ansible_control_node.feature:83: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: 22354.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: '12:52:09.903204'
duration: 2805.184
__id__: run_ansible_playbook
And
file "/tmp/file.txt" should exist on "ssh_minion"
0s
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Cleanup: Disable Ansible and remove test playbooks and inventory file
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.515
When
I follow "Properties" in the content area
00:00:00.076
And
I uncheck "ansible_control_node"
00:00:10.083
And
I click on "Update Properties"
00:00:01.192
Then
I should see a "System properties changed" text
00:00:00.091
And
I remove package "orion-dummy" from this "ssh_minion" without error control
00:00:01.352
And
I remove "/tmp/file.txt" from "ssh_minion"
00:00:00.443
@scope_ansible
@scope_salt_ssh
@ssh_minion
@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 "ssh_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
@scope_salt_ssh
@ssh_minion
Scenario: Cleanup: Disable "Ansible control node" system type
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.476
When
I follow "Properties" in the content area
00:00:00.076
And
I uncheck "ansible_control_node"
00:00:10.031
And
I click on "Update Properties"
00:00:00.852
@scope_ansible
@scope_salt_ssh
@ssh_minion
Scenario: Cleanup: Apply highstate to disable the minion as an "Ansible control node"
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.546
When
I follow "States" in the content area
00:00:00.079
And
I click on "Apply Highstate"
00:00:00.068
And
I wait until event "Apply highstate scheduled" is completed
00:00:38.686