Skip to content

Commit

Permalink
feat(pkg): include epel formula state
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoolGuy committed Nov 17, 2023
1 parent e9b1d24 commit ac4e2e1
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 4 deletions.
15 changes: 15 additions & 0 deletions cobbler/package/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,25 @@
{%- from tplroot ~ "/map.jinja" import mapdata as cobbler with context %}
{%- set sls_repo_available = tplroot ~ '.package.repository' %}
{% if cobbler.pkg.epel.enabled %}
include:
- epel
cobbler-package-install-pkg-enable-dnf-module:
cmd.run:
- name: dnf module enable cobbler
- unless: dnf module list --enabled | grep cobbler
- require:
- pkg: epel_release
{% endif %}
cobbler-package-install-pkg-installed:
pkg.installed:
- name: {{ cobbler.pkg.name }}
{% if cobbler.pkg.communityrepo.enabled %}
- require:
- sls: {{ sls_repo_available }}
{% elif cobbler.pkg.epel.enabled %}
- require:
- pkg: epel_release
{% endif %}
4 changes: 4 additions & 0 deletions cobbler/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ values:
enabled: false
version: "main"
communityrepo:
# This is mutually exclusive with "epel"!
enabled: false
# Available: "2.4.x", "2.6.x", "2.8.x", "3.0.x", "3.1.x", "3.2.x", "3.3.x"
version: "3.3.x"
epel:
# This is mutually exclusive with "communityrepo"!
enabled: false
name: cobbler
service:
name: cobblerd
Expand Down
6 changes: 5 additions & 1 deletion cobbler/parameters/os/Fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@
# you can remove this file or provide at least an empty dict, e.g.
# values: {}
---
values: {}
values:
pkg:
epel:
# Reset to false since Cobbler is in Fedora
enabled: false
...
3 changes: 3 additions & 0 deletions cobbler/parameters/os_family/RedHat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# values: {}
---
values:
pkg:
epel:
enabled: true
tftp:
location: "/var/lib/tftpboot"
...
4 changes: 3 additions & 1 deletion test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ values:
- Y:G@id
master: template-master
pkg:
name: bash
name: cobbler
epel:
enabled: true
rootgroup: root
service:
name: systemd-journald
Expand Down
4 changes: 3 additions & 1 deletion test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ values:
- Y:G@id
master: template-master
pkg:
name: bash
name: cobbler
epel:
enabled: true
rootgroup: root
service:
name: systemd-journald
Expand Down
2 changes: 2 additions & 0 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ values:
communityrepo:
enabled: true
version: "3.3.x"
epel:
enabled: false
name: cobbler
source:
enabled: false
Expand Down
2 changes: 2 additions & 0 deletions test/integration/default/files/_mapdata/fedora-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ values:
communityrepo:
enabled: false
version: "3.3.x"
epel:
enabled: false
name: cobbler
source:
enabled: false
Expand Down
2 changes: 2 additions & 0 deletions test/integration/default/files/_mapdata/opensuse-15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ values:
communityrepo:
enabled: false
version: "3.3.x"
epel:
enabled: false
name: cobbler
source:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ values:
communityrepo:
enabled: false
version: "3.3.x"
epel:
enabled: false
name: cobbler
source:
enabled: false
Expand Down
4 changes: 3 additions & 1 deletion test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ values:
- Y:G@id
master: template-master
pkg:
name: bash
name: cobbler
epel:
enabled: true
rootgroup: root
service:
name: systemd-journald
Expand Down
2 changes: 2 additions & 0 deletions test/integration/default/files/_mapdata/ubuntu-22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ values:
communityrepo:
enabled: true
version: "3.3.x"
epel:
enabled: false
name: cobbler
source:
enabled: false
Expand Down

0 comments on commit ac4e2e1

Please sign in to comment.