specinfra 2.82.6 → 2.82.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command.rb +6 -0
- data/lib/specinfra/command/redhat/base/selinux_module.rb +11 -0
- data/lib/specinfra/command/redhat/base/yumrepo.rb +8 -0
- data/lib/specinfra/command/redhat/v8.rb +2 -0
- data/lib/specinfra/command/redhat/v8/selinux_module.rb +11 -0
- data/lib/specinfra/command/redhat/v8/yumrepo.rb +11 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/redhat8/selinux_spec.rb +12 -0
- data/spec/command/redhat8/yumrepo_spec.rb +12 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671e4afdf9fbb9f6f886aa09733f3ca0e9b5668a
|
4
|
+
data.tar.gz: 265a0c2751a5e1aa801b15928492face70236ffc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50ab2a42676d0e85bfd772c760974a0066f6bc71900d7d69de1071be67c5d713fed92c99240f642d2ca709f1d5111603350e02717173dba84ef70214f1cd2a35
|
7
|
+
data.tar.gz: 97f368aa14c5d6c3ff654d398fa0d95dd53229d663564c6a48b51018bd32f7193bcbf234e6dd508510bcc862b8e09625b69e85090ca540bfe702dbc29923eba5
|
data/lib/specinfra/command.rb
CHANGED
@@ -84,6 +84,7 @@ require 'specinfra/command/redhat/base/host'
|
|
84
84
|
require 'specinfra/command/redhat/base/iptables'
|
85
85
|
require 'specinfra/command/redhat/base/package'
|
86
86
|
require 'specinfra/command/redhat/base/port'
|
87
|
+
require 'specinfra/command/redhat/base/selinux_module'
|
87
88
|
require 'specinfra/command/redhat/base/service'
|
88
89
|
require 'specinfra/command/redhat/base/yumrepo'
|
89
90
|
|
@@ -97,6 +98,11 @@ require 'specinfra/command/redhat/v7/host'
|
|
97
98
|
require 'specinfra/command/redhat/v7/service'
|
98
99
|
require 'specinfra/command/redhat/v7/port'
|
99
100
|
|
101
|
+
# RedHat V8 (inherit RedHat)
|
102
|
+
require 'specinfra/command/redhat/v8'
|
103
|
+
require 'specinfra/command/redhat/v8/yumrepo'
|
104
|
+
require 'specinfra/command/redhat/v8/selinux_module'
|
105
|
+
|
100
106
|
# Fedora (inherit RedhHat)
|
101
107
|
require 'specinfra/command/fedora'
|
102
108
|
require 'specinfra/command/fedora/base'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Specinfra::Command::Redhat::Base::SelinuxModule < Specinfra::Command::Linux::Base::SelinuxModule
|
2
|
+
class << self
|
3
|
+
def create(os_info=nil)
|
4
|
+
if (os_info || os)[:release].to_i < 8
|
5
|
+
self
|
6
|
+
else
|
7
|
+
Specinfra::Command::Redhat::V8::SelinuxModule
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,5 +1,13 @@
|
|
1
1
|
class Specinfra::Command::Redhat::Base::Yumrepo < Specinfra::Command::Linux::Base::Yumrepo
|
2
2
|
class << self
|
3
|
+
def create(os_info=nil)
|
4
|
+
if (os_info || os)[:release].to_i < 8
|
5
|
+
self
|
6
|
+
else
|
7
|
+
Specinfra::Command::Redhat::V8::Yumrepo
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
3
11
|
def check_exists(repository)
|
4
12
|
"yum repolist all -C | grep -qsE \"^[\\!\\*]?#{escape(repository)}\(\\s\|$\|\\/)\""
|
5
13
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Specinfra::Command::Redhat::V8::SelinuxModule < Specinfra::Command::Redhat::Base::SelinuxModule
|
2
|
+
class << self
|
3
|
+
def check_is_installed(name, version=nil)
|
4
|
+
"semodule -l | grep $'^#{escape(name)}'"
|
5
|
+
end
|
6
|
+
|
7
|
+
def check_is_enabled(name)
|
8
|
+
"semodule -l | grep $'^#{escape(name)}'"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Specinfra::Command::Redhat::V8::Yumrepo < Specinfra::Command::Redhat::Base::Yumrepo
|
2
|
+
class << self
|
3
|
+
def check_exists(repository)
|
4
|
+
"dnf repolist all | grep -qsE \"^[\\!\\*]?#{escape(repository)}\(\\s\|$\|\\/)\""
|
5
|
+
end
|
6
|
+
|
7
|
+
def check_is_enabled(repository)
|
8
|
+
"dnf repolist enabled | grep -qs \"^[\\!\\*]\\?#{escape(repository)}\""
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
property[:os] = nil
|
4
|
+
set :os, :family => 'redhat', :release => '8'
|
5
|
+
|
6
|
+
describe get_command(:check_selinux_module_is_installed, 'dnsmasq') do
|
7
|
+
it { should eq "semodule -l | grep $'^dnsmasq'" }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe get_command(:check_selinux_module_is_enabled, 'dnsmasq') do
|
11
|
+
it { should eq "semodule -l | grep $'^dnsmasq'" }
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
property[:os] = nil
|
4
|
+
set :os, :family => 'redhat', :release => '8'
|
5
|
+
|
6
|
+
describe get_command(:check_yumrepo_exists, 'epel') do
|
7
|
+
it { should eq "dnf repolist all | grep -qsE \"^[\\!\\*]?epel\(\\s\|$\|\\/)\"" }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe get_command(:check_yumrepo_is_enabled, 'epel') do
|
11
|
+
it { should eq "dnf repolist enabled | grep -qs \"^[\\!\\*]\\?epel\"" }
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.82.
|
4
|
+
version: 2.82.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|
@@ -359,6 +359,7 @@ files:
|
|
359
359
|
- lib/specinfra/command/redhat/base/iptables.rb
|
360
360
|
- lib/specinfra/command/redhat/base/package.rb
|
361
361
|
- lib/specinfra/command/redhat/base/port.rb
|
362
|
+
- lib/specinfra/command/redhat/base/selinux_module.rb
|
362
363
|
- lib/specinfra/command/redhat/base/service.rb
|
363
364
|
- lib/specinfra/command/redhat/base/yumrepo.rb
|
364
365
|
- lib/specinfra/command/redhat/v5.rb
|
@@ -367,6 +368,9 @@ files:
|
|
367
368
|
- lib/specinfra/command/redhat/v7/host.rb
|
368
369
|
- lib/specinfra/command/redhat/v7/port.rb
|
369
370
|
- lib/specinfra/command/redhat/v7/service.rb
|
371
|
+
- lib/specinfra/command/redhat/v8.rb
|
372
|
+
- lib/specinfra/command/redhat/v8/selinux_module.rb
|
373
|
+
- lib/specinfra/command/redhat/v8/yumrepo.rb
|
370
374
|
- lib/specinfra/command/sles.rb
|
371
375
|
- lib/specinfra/command/sles/base.rb
|
372
376
|
- lib/specinfra/command/sles/base/service.rb
|
@@ -562,6 +566,8 @@ files:
|
|
562
566
|
- spec/command/redhat7/interface_spec.rb
|
563
567
|
- spec/command/redhat7/port_spec.rb
|
564
568
|
- spec/command/redhat7/service_spec.rb
|
569
|
+
- spec/command/redhat8/selinux_spec.rb
|
570
|
+
- spec/command/redhat8/yumrepo_spec.rb
|
565
571
|
- spec/command/sles11/user_spec.rb
|
566
572
|
- spec/command/sles15/service_spec.rb
|
567
573
|
- spec/command/solaris11/user_spec.rb
|
@@ -697,6 +703,8 @@ test_files:
|
|
697
703
|
- spec/command/redhat7/interface_spec.rb
|
698
704
|
- spec/command/redhat7/port_spec.rb
|
699
705
|
- spec/command/redhat7/service_spec.rb
|
706
|
+
- spec/command/redhat8/selinux_spec.rb
|
707
|
+
- spec/command/redhat8/yumrepo_spec.rb
|
700
708
|
- spec/command/sles11/user_spec.rb
|
701
709
|
- spec/command/sles15/service_spec.rb
|
702
710
|
- spec/command/solaris11/user_spec.rb
|