@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.601
When
I follow "Properties" in the content area
00:00:00.075
And
I check "ansible_control_node"
00:00:00.084
And
I click on "Update Properties"
00:00:01.518
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.765
When
I follow "States" in the content area
00:00:00.072
And
I click on "Apply Highstate"
00:00:00.064
And
I wait until event "Apply highstate scheduled" is completed
00:01:14.978
+ 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:38: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: 18:42:40.610274
Duration: 1197.839
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: 18:42:43.305119
Duration: 1116.29
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: 18:42:44.424115
Duration: 98.414
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: 18:42:44.524120
Duration: 0.007
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: 18:42:44.524226
Duration: 853.086
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: 18:42:45.377444
Duration: 98.587
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: 18:42:45.476267
Duration: 75.529
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: 18:42:45.551933
Duration: 88.33
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: 18:42:45.640400
Duration: 60.172
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: 18:42:45.701034
Duration: 81.961
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: 18:42:45.783344
Duration: 266.726
SLS: channels
Changed: {}
----------
ID: pkg_installed
Function: pkg.installed
Name: pkg_installed
Result: true
Comment: No packages to install provided
Started: 18:42:46.050765
Duration: 0.79
SLS: packages.packages_771a3e5532bef76ffec193986a14039e
Changed: {}
----------
ID: pkg_removed
Function: pkg.removed
Name: pkg_removed
Result: true
Comment: All specified packages are already absent
Started: 18:42:46.051811
Duration: 12.579
SLS: packages.packages_771a3e5532bef76ffec193986a14039e
Changed: {}
----------
ID: pkg_latest
Function: pkg.latest
Name: pkg_latest
Result: true
Comment: No packages to install provided
Started: 18:42:46.064638
Duration: 1.328
SLS: packages.packages_771a3e5532bef76ffec193986a14039e
Changed: {}
----------
ID: disable_spacewalksd
Function: service.dead
Name: rhnsd
Result: true
Comment: The named service rhnsd is not available
Started: 18:42:46.066046
Duration: 24.541
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: 18:42:46.090744
Duration: 17.675
SLS: services.salt-minion
Changed: {}
----------
ID: disable_osad
Function: service.dead
Name: osad
Result: true
Comment: The named service osad is not available
Started: 18:42:46.108538
Duration: 13.916
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: 18:42:46.122576
Duration: 17.295
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: 18:42:46.139966
Duration: 73.939
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: 18:42:46.214053
Duration: 83.151
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: 18:42:46.297328
Duration: 1.842
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-p20967-i22723.scope; invocation ID: cdbe55261626400d804b1308670f2b02
Package 'ansible' not found.Loading repository data...
Reading installed packages...
Started: 18:42:46.299260
Duration: 2361.821
SLS: ansible
Changed: {}
Then
"ansible" should be installed on "ssh_minion"
0s
@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.737
When
I follow "Ansible" in the content area
00:00:00.086
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.879
When
I follow "Ansible" in the content area
00:00:00.064
Then
I should see a "Ansible Control Node Configuration" text
00:00:00.062
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.064
And
I enter "/srv/playbooks/orion_dummy/hosts" as "new_inventory_path_input"
00:00:00.102
And
I click on "new_inventory_path_save"
00:00:00.064
Given
I am on the Systems overview page of this "ssh_minion"
00:00:01.606
When
I follow "Ansible" in the content area
00:00:00.063
And
I follow "Inventories" in the content area
00:00:00.068
And
I wait until I see "/srv/playbooks/orion_dummy/hosts" text
00:00:00.250
And
I click on the inventory accordion for "/srv/playbooks/orion_dummy/hosts"
00:00:00.051
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:61:in `I wait until I see "myself" text'
@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.593
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.157
And
I click on "/srv/playbooks"
00:00:00.062
Then
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:04:09.997
+ 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:69:in `I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text'
@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.555
When
I follow "Ansible" in the content area
00:00:00.079
And
I follow "Playbooks" in the content area
00:00:00.068
And
I wait until I see "/srv/playbooks" text
00:00:00.243
And
I click on "/srv/playbooks"
00:00:00.057
And
I wait until I see "/srv/playbooks/orion_dummy/playbook_orion_dummy.yml" text
00:04:10.030
+ 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:77: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
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.599
When
I follow "Properties" in the content area
00:00:00.082
And
I uncheck "ansible_control_node"
00:00:10.076
And
I click on "Update Properties"
00:00:01.159
Then
I should see a "System properties changed" text
00:00:00.095
And
I remove package "orion-dummy" from this "ssh_minion" without error control
00:00:01.334
And
I remove "/tmp/file.txt" from "ssh_minion"
00:00:00.498
@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.770
When
I follow "Properties" in the content area
00:00:00.082
And
I uncheck "ansible_control_node"
00:00:10.044
And
I click on "Update Properties"
00:00:00.905
@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.733
When
I follow "States" in the content area
00:00:00.079
And
I click on "Apply Highstate"
00:00:00.071
And
I wait until event "Apply highstate scheduled" is completed
00:00:38.472