Skip to content

Commit

Permalink
Merge pull request #8 from cobbler/feature/add-service
Browse files Browse the repository at this point in the history
Add systemd service management
  • Loading branch information
SchoolGuy authored Nov 21, 2023
2 parents f7d278c + 10f2da8 commit c19412a
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 43 deletions.
2 changes: 1 addition & 1 deletion cobbler/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ values:
rootgroup: root
config: '/etc/cobbler'
service:
name: cobbler
name: cobblerd
# Just here for testing
added_in_defaults: defaults_value
winner: defaults
Expand Down
12 changes: 1 addition & 11 deletions test/integration/default/controls/services.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
# frozen_string_literal: true

# Prepare platform "finger"
platform_finger = system.platform[:finger].split('.').first.to_s

control 'cobbler.service.running' do
title 'The service should be installed, enabled and running'

# Override by `platform_finger`
service_name =
case platform_finger
when 'centos-6', 'amazonlinux-1'
'crond'
else
'systemd-journald'
end
service_name = 'cobblerd'

describe service(service_name) do
it { should be_installed }
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/amazonlinux-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: cronie
rootgroup: root
service:
name: crond
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/centos-6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: cronie
rootgroup: root
service:
name: crond
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: "main"
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/fedora-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/opensuse-15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/oraclelinux-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/oraclelinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/ubuntu-16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/ubuntu-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/ubuntu-20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ values:
name: bash
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/files/_mapdata/ubuntu-22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ values:
version: main
rootgroup: root
service:
name: systemd-journald
name: cobblerd
tofs:
files_switch:
- any/path/can/be/used/here
Expand Down
2 changes: 0 additions & 2 deletions test/salt/pillar/default.sls
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ cobbler:
winner: lookup
added_in_lookup: lookup_value

service:
name: systemd-journald
config: /etc/template-formula.conf

tofs:
Expand Down
7 changes: 2 additions & 5 deletions test/salt/pillar/upstart.sls
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ cobbler:
winner: lookup
added_in_lookup: lookup_value

# Using bash package and udev service as an example. This allows us to
# test the template formula itself. You should set these parameters to
# examples that make sense in the contexto of the formula you're writing.
pkg:
name: cronie
name: cobbler
service:
name: crond
name: cobblerd
config: /etc/template-formula.conf

tofs:
Expand Down

0 comments on commit c19412a

Please sign in to comment.