Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Drop cockpit-ws* groups #187

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ assuming your machines are joined to a FreeIPA domain.
- name: monger-cockpit
dns: ['localhost', 'www.example.com']
ca: ipa
group: cockpit-ws
# with Cockpit < 257 (RHEL 7) you need:
# group: cockpit-ws
```

Note: Generating a new certificate using the `certificate` system role in the playbook remains supported.
Expand All @@ -235,7 +236,8 @@ This example also installs Cockpit with an IdM-issued web server certificate.
- name: /etc/cockpit/ws-certs.d/monger-cockpit
dns: ['localhost', 'www.example.com']
ca: ipa
group: cockpit-ws # or cockpit-wsinstance on newer cockpit versions
# with Cockpit < 257 (RHEL 7) you need:
# group: cockpit-ws
```

NOTE: The `certificate` role, unless using IPA and joining the systems to an IPA domain,
Expand Down
14 changes: 6 additions & 8 deletions tests/tasks/get_cockpit_group.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# SPDX-License-Identifier: MIT
---
- name: Get name of cockpit group for tests
getent:
database: group
key: cockpit-wsinstance
fail_key: false

# The ownership of the certificate hasn't mattered since Cockpit 257,
# which is in RHEL 8.7, 9.0, and all current Fedora/Debian/Ubuntu OSes.
# This only matters for RHEL 7
- name: Set __cockpit_test_group
set_fact:
__cockpit_test_group: "{{ 'cockpit-wsinstance'
if ansible_facts['getent_group'].get('cockpit-wsinstance')
else 'cockpit-ws' }}"
__cockpit_test_group: "{{ 'cockpit-ws'
if (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_version'] | int == 7)
else 'root' }}"
Loading