Skip to content

Commit

Permalink
push changes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-robertson committed Jun 17, 2024
1 parent c653c28 commit b849f55
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions data/os/RedHat-9.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
observium::repos:
epel:
ensure: 'present'
Expand Down
1 change: 1 addition & 0 deletions data/os/RedHat-9gpg.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
observium::gpgkeys:
/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9: # https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9
content: |
Expand Down
9 changes: 1 addition & 8 deletions hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@ defaults: # Used for any hierarchy level that omits these keys.
data_hash: yaml_data # Use the built-in YAML backend.

hierarchy:
- name: "osfamily/major release"
paths:
# Used to distinguish between Debian and Ubuntu
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
# Used for Solaris
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
- name: "osfamily"
paths:
- "os/%{facts.os.name}.yaml"
- "os/%{facts.os.family}-%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}-%{facts.os.release.major}gpg.yaml"
- "os/%{facts.os.name}.yaml"
- name: 'common'
path: 'common.yaml'
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8"
"8",
"9"
]
},
{
Expand Down
24 changes: 24 additions & 0 deletions spec/classes/observium_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
context "on #{os}" do
let(:facts) { os_facts }

# it { is_expected.to contain_package(os_facts)}

it { is_expected.to compile }

Check failure on line 12 in spec/classes/observium_spec.rb

View workflow job for this annotation

GitHub Actions / Unit (centos-stream8, puppet7-nightly)

observium on redhat-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile } error during compilation: Evaluation Error: Error while evaluating a Method call, block parameter 'gpghash' expects a Hash value, got String (file: /home/runner/work/observium/observium/spec/fixtures/modules/observium/manifests/yum.pp, line: 12, column: 24) on node fv-az1567-48.ivwpl3vsblrubjity54i0equac.phxx.internal.cloudapp.net

Check failure on line 12 in spec/classes/observium_spec.rb

View workflow job for this annotation

GitHub Actions / Unit (centos-stream8, puppet8-nightly)

observium on redhat-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile } error during compilation: Evaluation Error: Error while evaluating a Method call, block parameter 'gpghash' expects a Hash value, got String (file: /home/runner/work/observium/observium/spec/fixtures/modules/observium/manifests/yum.pp, line: 12, column: 24) on node fv-az1487-855.vpy2y30pan5uhaa0ktko4c43jh.ex.internal.cloudapp.net

it { is_expected.to contain_cron('discovery all devices').with_command('/opt/observium/discovery.php -h all >> /dev/null 2>&1').with_user('root') }

Check failure on line 14 in spec/classes/observium_spec.rb

View workflow job for this annotation

GitHub Actions / Unit (centos-stream8, puppet7-nightly)

observium on redhat-9-x86_64 is expected to contain Cron[discovery all devices] with command => "/opt/observium/discovery.php -h all >> /dev/null 2>&1" and user => "root" Failure/Error: it { is_expected.to contain_cron('discovery all devices').with_command('/opt/observium/discovery.php -h all >> /dev/null 2>&1').with_user('root') } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Method call, block parameter 'gpghash' expects a Hash value, got String (file: /home/runner/work/observium/observium/spec/fixtures/modules/observium/manifests/yum.pp, line: 12, column: 24) on node fv-az1567-48.ivwpl3vsblrubjity54i0equac.phxx.internal.cloudapp.net

Check failure on line 14 in spec/classes/observium_spec.rb

View workflow job for this annotation

GitHub Actions / Unit (centos-stream8, puppet8-nightly)

observium on redhat-9-x86_64 is expected to contain Cron[discovery all devices] with command => "/opt/observium/discovery.php -h all >> /dev/null 2>&1" and user => "root" Failure/Error: it { is_expected.to contain_cron('discovery all devices').with_command('/opt/observium/discovery.php -h all >> /dev/null 2>&1').with_user('root') } Puppet::PreformattedError: Evaluation Error: Error while evaluating a Method call, block parameter 'gpghash' expects a Hash value, got String (file: /home/runner/work/observium/observium/spec/fixtures/modules/observium/manifests/yum.pp, line: 12, column: 24) on node fv-az1487-855.vpy2y30pan5uhaa0ktko4c43jh.ex.internal.cloudapp.net
Expand Down Expand Up @@ -72,6 +74,28 @@
it { is_expected.to contain_package('php-json') }
end

context 'on rhel9' do
let(:facts) do
{
'os' => {
'family' => 'RedHat',
'name' => 'RedHat',
'release' => {
'major' => '9',
},
'selinux' => {
'enabled' => true,
'current_mode' => 'enforcing',
},
}
}
end

it { is_expected.to contain_service('httpd') }
it { is_expected.to contain_package('python3-PyMySQL') }
it { is_expected.to contain_package('php-json') }
end

context 'on ubuntu 18.04' do
let(:facts) do
{
Expand Down

0 comments on commit b849f55

Please sign in to comment.