Skip to content

Commit

Permalink
Ensure the selinux topscope fact is present
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jan 9, 2024
1 parent 1a53484 commit be3d538
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions facts/3.0/ubuntu-15.10-i386.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"hostname": "foo",
"domain": "example.com",
Expand Down
1 change: 1 addition & 0 deletions facts/3.0/ubuntu-15.10-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"hostname": "foo",
"domain": "example.com",
Expand Down
1 change: 1 addition & 0 deletions facts/3.10/ubuntu-18.04-aarch64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"fqdn": "foo.example.com",
"domain": "example.com",
Expand Down
1 change: 1 addition & 0 deletions facts/3.6/pcs-6-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"fqdn": "foo.example.com",
"domain": "example.com",
Expand Down
1 change: 1 addition & 0 deletions facts/4.0/centos-7-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"operatingsystem": "CentOS",
"osfamily": "RedHat",
Expand Down
1 change: 1 addition & 0 deletions facts/4.0/debian-10-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"operatingsystem": "Debian",
"osfamily": "Debian",
Expand Down
1 change: 1 addition & 0 deletions facts/4.0/oraclelinux-7-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"operatingsystem": "OracleLinux",
"osfamily": "RedHat",
Expand Down
1 change: 1 addition & 0 deletions facts/4.0/redhat-7-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"operatingsystem": "RedHat",
"osfamily": "RedHat",
Expand Down
1 change: 1 addition & 0 deletions facts/4.0/scientific-7-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"ipaddress": "192.168.0.1",
"operatingsystem": "Scientific",
"osfamily": "RedHat",
Expand Down
1 change: 1 addition & 0 deletions facts/4.2/amazon-2022-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"hostname": "foo",
"operatingsystem": "Amazon",
"osfamily": "RedHat",
Expand Down
1 change: 1 addition & 0 deletions facts/4.2/centos-9-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"domain": "example.com",
"fqdn": "foo.example.com",
"hostname": "foo",
Expand Down
1 change: 1 addition & 0 deletions facts/4.2/oraclelinux-9-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"domain": "example.com",
"fqdn": "foo.example.com",
"hostname": "foo",
Expand Down
1 change: 1 addition & 0 deletions facts/4.2/popos-21.10-x86_64.facts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"selinux": false,
"aio_agent_version": "7.12.1",
"augeas": {
"version": "1.12.0"
Expand Down
7 changes: 7 additions & 0 deletions spec/facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@
it 'contains the legacy operatingsystem fact' do
expect(content['operatingsystem']).not_to be_nil
end

# the fact got introduced in 1.5.5 and is confined to kernel=linux
# https://github.com/puppetlabs/facter/blob/1.6.0/lib/facter/selinux.rb
# f94abfccfd6687a88f62703e4005c28ec04467a1 from facter
it 'contains the legacy selinux fact' do
expect(content['selinux']).not_to be_nil if content['kernel'] == 'Linux'
end
end
end
end

0 comments on commit be3d538

Please sign in to comment.