@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
@susemanager
Feature: 0126 - Operate an Ansible control node in SSH minion
Description: * Related GitHub Card: https://github.com/SUSE/spacewalk/issues/30806
File name: minssh_ansible_control_node.feature
Relative path: secondary/minssh_ansible_control_node.feature
@scope_ansible
@scope_salt_ssh
@ssh_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 "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
@bug_reported
Scenario: Enable "Ansible control node" system type
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.819
When
I follow "Properties" in the content area
00:00:00.069
And
I check "ansible_control_node"
00:00:00.081
And
I click on "Update Properties"
00:00:01.874
Then
I wait until I see "Ansible Control Node type has been applied." text
00:00:00.089
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
@bug_reported
Scenario: Apply highstate and check that Ansible is installed
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.910
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:15.088
+ 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:41:in `I wait until event "Apply highstate scheduled" is completed'
Event Details:
Failed to apply state(s): highstate
----------
ID: sync_states
Function: saltutil.sync_states
Name: sync_states
Result: true
Comment: No updates to sync
Started: 06:08:00.370853
Duration: 1208.293
SLS: util.syncstates
Changed: {}
----------
ID: mgr_absent_ca_package
Function: pkg.removed
Name: rhn-org-trusted-ssl-cert
Result: true
Comment: All specified packages are already absent
Started: 06:08:03.099183
Duration: 1148.431
SLS: certs
Changed: {}
----------
ID: mgr_ca_cert
Function: file.managed
Name: /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT
Result: true
Comment: File /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT is in the correct state
Started: 06:08:04.250644
Duration: 99.618
SLS: certs
Changed: {}
----------
ID: update-ca-certificates
Function: cmd.run
Name: /usr/sbin/update-ca-certificates
Result: true
Comment: State was not run because none of the onchanges reqs changed
Started: 06:08:04.351477
Duration: 0.006
SLS: certs
Changed: {}
----------
ID: mgr_proxy_ca_cert_symlink
Function: file.symlink
Name: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
Result: true
Comment: onlyif condition is false
Started: 06:08:04.351569
Duration: 797.635
SLS: certs
Changed: {}
----------
ID: mgr_deploy_tools_uyuni_key
Function: file.managed
Name: /etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key
Result: true
Comment: File /etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key is in the correct state
Started: 06:08:05.149331
Duration: 92.2
SLS: channels.gpg-keys
Changed: {}
----------
ID: mgr_deploy_suse_addon_key
Function: file.managed
Name: /etc/pki/rpm-gpg/suse-addon-97a636db0bad8ecc.key
Result: true
Comment: File /etc/pki/rpm-gpg/suse-addon-97a636db0bad8ecc.key is in the correct state
Started: 06:08:05.241642
Duration: 72.652
SLS: channels.gpg-keys
Changed: {}
----------
ID: mgr_deploy_suse16_gpg_key
Function: file.managed
Name: /etc/pki/rpm-gpg/suse16-gpg-pubkey-09d9ea69.key
Result: true
Comment: File /etc/pki/rpm-gpg/suse16-gpg-pubkey-09d9ea69.key is in the correct state
Started: 06:08:05.314410
Duration: 63.068
SLS: channels.gpg-keys
Changed: {}
----------
ID: file_///etc/pki/rpm-gpg/uyuni-tools-gpg-pubkey-0d20833e.key
Function: module.run
Name: pkg.add_repo_key
Result: true
Comment: Module function pkg.add_repo_key executed
Started: 06:08:05.377604
Duration: 60.792
SLS: channels.gpg-keys
Changed: ret: true
----------
ID: file_///usr/lib/rpm/gnupg/keys/gpg-pubkey-29b700a4-62b07e22.asc
Function: module.run
Name: pkg.add_repo_key
Result: true
Comment: Module function pkg.add_repo_key executed
Started: 06:08:05.438517
Duration: 65.719
SLS: channels.gpg-keys
Changed: ret: true
----------
ID: mgrchannels_repo
Function: file.managed
Name: /etc/zypp/repos.d/susemanager:channels.repo
Result: true
Comment: File /etc/zypp/repos.d/susemanager:channels.repo is in the correct state
Started: 06:08:05.504457
Duration: 219.002
SLS: channels
Changed: {}
----------
ID: pkg_installed
Function: pkg.installed
Name: pkg_installed
Result: true
Comment: No packages to install provided
Started: 06:08:05.724190
Duration: 1.041
SLS: packages.packages_bfd22c896616f8b3ec85a05f6a457456
Changed: {}
----------
ID: pkg_removed
Function: pkg.removed
Name: pkg_removed
Result: true
Comment: All specified packages are already absent
Started: 06:08:05.725430
Duration: 12.758
SLS: packages.packages_bfd22c896616f8b3ec85a05f6a457456
Changed: {}
----------
ID: pkg_latest
Function: pkg.latest
Name: pkg_latest
Result: true
Comment: No packages to install provided
Started: 06:08:05.738388
Duration: 0.645
SLS: packages.packages_bfd22c896616f8b3ec85a05f6a457456
Changed: {}
----------
ID: disable_spacewalksd
Function: service.dead
Name: rhnsd
Result: true
Comment: The named service rhnsd is not available
Started: 06:08:05.739102
Duration: 18.414
SLS: services.salt-minion
Changed: {}
----------
ID: disable_spacewalk-update-status
Function: service.dead
Name: spacewalk-update-status
Result: true
Comment: The named service spacewalk-update-status is not available
Started: 06:08:05.757916
Duration: 12.928
SLS: services.salt-minion
Changed: {}
----------
ID: disable_osad
Function: service.dead
Name: osad
Result: true
Comment: The named service osad is not available
Started: 06:08:05.770988
Duration: 12.066
SLS: services.salt-minion
Changed: {}
----------
ID: remove_traditional_stack_all
Function: pkg.removed
Name: remove_traditional_stack_all
Result: true
Comment: All specified packages are already absent
Started: 06:08:05.783178
Duration: 12.536
SLS: services.salt-minion
Changed: {}
----------
ID: remove_traditional_stack
Function: pkg.removed
Name: remove_traditional_stack
Result: true
Comment: All specified packages are already absent
Started: 06:08:05.795810
Duration: 59.581
SLS: services.salt-minion
Changed: {}
----------
ID: logrotate_configuration
Function: file.managed
Name: /etc/logrotate.d/salt-ssh
Result: true
Comment: File /etc/logrotate.d/salt-ssh is in the correct state
Started: 06:08:05.855509
Duration: 90.623
SLS: services.salt-minion
Changed: {}
----------
ID: /etc/sysconfig/rhn/systemid
Function: file.managed
Name: /etc/sysconfig/rhn/systemid
Result: true
Comment: File /etc/sysconfig/rhn/systemid exists with proper permissions. No changes made.
Started: 06:08:05.946243
Duration: 2.48
SLS: services.salt-minion
Changed: {}
----------
ID: mgr_ansible_installed
Function: pkg.installed
Name: mgr_ansible_installed
Result: false
Comment: An error was encountered while installing package(s): Zypper command failure: Running as unit: run-p20908-i22630.scope; invocation ID: 321b60bf44804c228aa38cf579d3a0f0
ansible-core-2.21.1-1.1.noarch (openSUSE Tumbleweed (x86_64)): Signature verification failed [5-File does not exist or signature can't be checked]
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 6 NEW packages are going to be installed:
ansible ansible-core librpmbuild10 python313-packaging python313-resolvelib python313-rpm
6 new packages to install.
Package download size: 50.2 MiB
Package install size change:
| 347.5 MiB required by packages that will be installed
347.5 MiB | - 0 B released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Preloading Packages [..
Preloading: python313-resolvelib-1.2.1-1.3.noarch.rpm [done]
.
Preloading: librpmbuild10-4.20.1-7.1.x86_64.rpm [done]
.
Preloading: ansible-core-2.21.1-1.1.noarch.rpm [done]
.
Preloading: python313-rpm-4.20.1-7.1.x86_64.rpm [done]
.
Preloading: python313-packaging-26.2-1.1.noarch.rpm [done]
..
Preloading: ansible-14.1.0-1.1.noarch.rpm [done]
.done]
Retrieving: python313-resolvelib-1.2.1-1.3.noarch (openSUSE Tumbleweed (x86_64)) (1/6), 52.6 KiB
Retrieving: python313-packaging-26.2-1.1.noarch (openSUSE Tumbleweed (x86_64)) (2/6), 99.7 KiB
Retrieving: librpmbuild10-4.20.1-7.1.x86_64 (openSUSE Tumbleweed (x86_64)) (3/6), 103.0 KiB
Retrieving: python313-rpm-4.20.1-7.1.x86_64 (openSUSE Tumbleweed (x86_64)) (4/6), 58.1 KiB
Retrieving: ansible-core-2.21.1-1.1.noarch (openSUSE Tumbleweed (x86_64)) (5/6), 3.1 MiB
ansible-core-2.21.1-1.1.noarch.rpm:
Header V3 RSA/SHA512 Signature, key ID 35a2f86e29b700a4: NOTTRUSTED
V3 RSA/SHA512 Signature, key ID 35a2f86e29b700a4: NOTTRUSTED
Abort, retry, ignore? [a/r/i] (a): a
Started: 06:08:05.948813
Duration: 5705.713
SLS: ansible
Changed: {}
----------
ID: mgr_ansible_inventory_refresh
Function: module.run
Name: event.send
Result: true
Comment: onlyif condition is false
Started: 06:08:11.654642
Duration: 17.236
SLS: ansible
Changed: {}
Then
"ansible" should be installed on "ssh_minion"
0s
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
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.803
When
I follow "Ansible" in the content area
00:00:00.079
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.062
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
Scenario: Configure some inventory and playbooks path
Given
I am on the Systems overview page of this "ssh_minion"
00:00:02.006
When
I follow "Ansible" in the content area
00:00:00.063
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.059
And
I enter "/srv/playbooks/" as "new_playbook_path_input"
00:00:00.140
And
I click on "new_playbook_path_save"
00:00:00.060
And
I enter "/srv/playbooks/orion_dummy/hosts" as "new_inventory_path_input"
00:00:00.100
And
I click on "new_inventory_path_save"
00:00:00.065
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
Scenario: Display inventories
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.851
When
I follow "Ansible" in the content area
00:00:00.061
And
I follow "Inventories" in the content area
00:00:00.080
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.342
And
I click on the inventory accordion for "/srv/playbooks/orion_dummy/hosts"
00:00:00.052
Text 'myself' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:40:in `/^I wait until I see "([^"]*)" text$/' features/secondary/minssh_ansible_control_node.feature:64:in `I wait until I see "myself" text'
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
Scenario: Discover playbooks and display them
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.851
When
I follow "Ansible" in the content area
00:00:00.079
And
I follow "Playbooks" in the content area
00:00:00.074
And
I wait until I see "/srv/playbooks" text
00:00:00.249
And
I click on "/srv/playbooks"
00:00:00.058
Then
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:04:10.156
+ Show Error
+ Screenshot
Text '/srv/playbooks/orion_dummy/playbook_orion_dummy.yml' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:40:in `/^I wait until I see "([^"]*)" text$/' features/secondary/minssh_ansible_control_node.feature:72:in `I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text'
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
Scenario: Run a playbook using custom inventory
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.821
When
I follow "Ansible" in the content area
00:00:00.084
And
I follow "Playbooks" in the content area
00:00:00.069
And
I wait until I see "/srv/playbooks" text
00:00:00.244
And
I click on "/srv/playbooks"
00:00:00.056
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:04:10.486
+ Show Error
+ Screenshot
Text '/srv/playbooks/orion_dummy/playbook_orion_dummy.yml' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:40:in `/^I wait until I see "([^"]*)" text$/' features/secondary/minssh_ansible_control_node.feature:80:in `I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text'
And
I click on "orion_dummy/playbook_orion_dummy.yml"
0s
And
I wait until I see "Playbook Content" text
0s
And
I select "/srv/playbooks/orion_dummy/hosts" from "inventory-path-select"
0s
And
I click on "Schedule"
0s
Then
I should see a "Playbook execution has been scheduled" text
0s
And
I wait until event "Execute playbook 'playbook_orion_dummy.yml' scheduled" is completed
0s
And
file "/tmp/file.txt" should exist on "ssh_minion"
0s
@scope_ansible
@scope_salt_ssh
@ssh_minion
@bug_reported
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.847
When
I follow "Properties" in the content area
00:00:00.076
And
I uncheck "ansible_control_node"
00:00:10.084
And
I click on "Update Properties"
00:00:01.272
Then
I should see a "System properties changed" text
00:00:00.094
And
I remove package "orion-dummy" from this "ssh_minion" without error control
00:00:01.276
And
I remove "/tmp/file.txt" from "ssh_minion"
00:00:00.452
@scope_ansible
@scope_salt_ssh
@ssh_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 "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
@bug_reported
Scenario: Cleanup: Disable "Ansible control node" system type
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.704
When
I follow "Properties" in the content area
00:00:00.063
And
I uncheck "ansible_control_node"
00:00:10.031
And
I click on "Update Properties"
00:00:00.787
@scope_ansible
@scope_salt_ssh
@ssh_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 "ssh_minion"
00:00:01.755
When
I follow "States" in the content area
00:00:00.075
And
I click on "Apply Highstate"
00:00:00.060
And
I wait until event "Apply highstate scheduled" is completed
00:00:38.589