specinfra 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b6a949c9ddf160afaeb0d25b499f1bb959c24cb
4
- data.tar.gz: 53c24b1f59e94e0cdcf77930992f648ca05fa788
3
+ metadata.gz: 5c94f555e4758d65d6f972db97fc66e87bd5f428
4
+ data.tar.gz: 11bba5c1f94f44fbc4bb2175ed1e2b034dd072a2
5
5
  SHA512:
6
- metadata.gz: 43aee4e28b36078caf1b6550c244ffbf7b8b1fb7032425c374d6374662b22a85d5f573288fc57c59a7dea6abb727f6099359dc79aab2773c7c5bcde6f1f862be
7
- data.tar.gz: 42e7759bac38628267fefd099bd4e6411d2171b3f7c56a9870d6ce080bdf5d4dd73ce44f3e5d9b5fc2a84e91ee79f766fa36461cdee437c4c0177b276cac86bc
6
+ metadata.gz: 03911fa2d1415955f377a0c591d034078fa8aa64bd14ff07e890cb1b9583873e4676d398b62f884914efcb045d36d6d14452465f96b945291d4e92e1e6b7a3c8
7
+ data.tar.gz: 453b575dde92a1317e36ea84f156c2a554f04528f22191ffbea1980eb108fb936d16dc031529507f233f8a51aa6632e5f1b41caf49ec169cf1a68b2881677485
@@ -27,6 +27,7 @@ require 'specinfra/command/base/ppa'
27
27
  require 'specinfra/command/base/process'
28
28
  require 'specinfra/command/base/routing_table'
29
29
  require 'specinfra/command/base/selinux'
30
+ require 'specinfra/command/base/selinux_module'
30
31
  require 'specinfra/command/base/service'
31
32
  require 'specinfra/command/base/user'
32
33
  require 'specinfra/command/base/yumrepo'
@@ -45,6 +46,7 @@ require 'specinfra/command/linux/base/lxc_container'
45
46
  require 'specinfra/command/linux/base/package'
46
47
  require 'specinfra/command/linux/base/ppa'
47
48
  require 'specinfra/command/linux/base/selinux'
49
+ require 'specinfra/command/linux/base/selinux_module'
48
50
  require 'specinfra/command/linux/base/service'
49
51
  require 'specinfra/command/linux/base/yumrepo'
50
52
  require 'specinfra/command/linux/base/zfs'
@@ -0,0 +1,2 @@
1
+ class Specinfra::Command::Base::SelinuxModule < Specinfra::Command::Base
2
+ end
@@ -0,0 +1,16 @@
1
+ class Specinfra::Command::Linux::Base::SelinuxModule < Specinfra::Command::Base::SelinuxModule
2
+ class << self
3
+ def check_is_installed(name, version=nil)
4
+ cmd = "semodule -l | grep $'^#{escape(name)}\\t"
5
+ cmd += "#{escape(version)}\\t" unless version.nil?
6
+ cmd += "'"
7
+ cmd
8
+ end
9
+
10
+ def check_is_enabled(name)
11
+ cmd = "semodule -l | grep $'^#{escape(name)}\\t'"
12
+ cmd += " | grep -v $'^#{escape(name)}\\t.*\\tDisabled$'"
13
+ cmd
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
@@ -170,6 +170,7 @@ files:
170
170
  - lib/specinfra/command/base/process.rb
171
171
  - lib/specinfra/command/base/routing_table.rb
172
172
  - lib/specinfra/command/base/selinux.rb
173
+ - lib/specinfra/command/base/selinux_module.rb
173
174
  - lib/specinfra/command/base/service.rb
174
175
  - lib/specinfra/command/base/user.rb
175
176
  - lib/specinfra/command/base/yumrepo.rb
@@ -214,6 +215,7 @@ files:
214
215
  - lib/specinfra/command/linux/base/package.rb
215
216
  - lib/specinfra/command/linux/base/ppa.rb
216
217
  - lib/specinfra/command/linux/base/selinux.rb
218
+ - lib/specinfra/command/linux/base/selinux_module.rb
217
219
  - lib/specinfra/command/linux/base/service.rb
218
220
  - lib/specinfra/command/linux/base/yumrepo.rb
219
221
  - lib/specinfra/command/linux/base/zfs.rb