itamae-plugin-recipe-selinux 0.0.2 → 0.0.3

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: b648bd1768ad6c6802198267c4b3638c0d0cc131
4
- data.tar.gz: 8dbafdd73027c200eca4ef97731b56da9f00aae9
3
+ metadata.gz: d06e6ce3b8032fe2afb107a7c13c48ff70fd0078
4
+ data.tar.gz: 29991c92b7ba7ba5bf679cf1b9186c2e48efc80d
5
5
  SHA512:
6
- metadata.gz: ebf4680cfabb9f294827308d89088d7a3b34023c349d8a022d3fc10a76314b967490718460a092446ecad73b3b78985a6042102cbc7fbaf9777cd6de24ad3fec
7
- data.tar.gz: 7e3874b6acf289d0ccdbf89e16e10518649796ad4f919bc342e912fec465e4d923e24a31c668eb872e362547ab17cef1aceeaba9c89728c101402ab30d946cd3
6
+ metadata.gz: d51df84bc60e2340dceae22b8998893ff445c2c0a56920033741ed213445b0f9fdbabb9bbb35c15a93bc21259bab8ce4102320d8b0361bf5dcc02cc7be35dc68
7
+ data.tar.gz: d6a5e5fb6530aabbe5bdb85c1ef0566a442d814edb6ee6fba1661f154595855d2c3e3531c4739fcba412107d7d6e7fd3bcf5456b918682ca3a1be905c2999245
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Itamae::Plugin::Recipe::Selinux
2
2
 
3
- TODO: Write a gem description
3
+ This is [Itamae](https://github.com/ryotarai/itamae) recipe plugin for controlling SELinux.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,24 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ To make SELinux disabled, write this line in your recipe.
22
+
23
+ ```ruby
24
+ include_recipe 'selinux::disabled'
25
+ ```
26
+
27
+ To make SELinux permissive, write this line in your recipe.
28
+
29
+ ```ruby
30
+ include_recipe 'selinux::permissive'
31
+ ```
32
+
33
+ To make SELinux enforcing, write this line in your recipe.
34
+
35
+ ```ruby
36
+ include_recipe 'selinux::enforcing'
37
+ ```
38
+
22
39
 
23
40
  ## Contributing
24
41
 
@@ -1,11 +0,0 @@
1
- require "itamae/plugin/recipe/selinux/version"
2
-
3
- module Itamae
4
- module Plugin
5
- module Recipe
6
- module Selinux
7
- # Your code goes here...
8
- end
9
- end
10
- end
11
- end
@@ -1,7 +1,6 @@
1
1
  case os[:family]
2
2
  when %r(debian|ubuntu)
3
3
  package 'selinux-utils'
4
- when 'redhat', 'fedora'
4
+ when %r(redhat|fedora)
5
5
  package 'libselinux-utils'
6
6
  end
7
-
@@ -0,0 +1,10 @@
1
+ include_recipe 'common.rb'
2
+
3
+ execute 'setenforce 1' do
4
+ not_if 'getenforce | grep Disabled'
5
+ end
6
+
7
+ template '/etc/selinux/config' do
8
+ @selinux = 'enforcing'
9
+ source 'config.erb'
10
+ end
@@ -0,0 +1,10 @@
1
+ include_recipe 'common.rb'
2
+
3
+ execute 'setenforce 0' do
4
+ not_if "getenforce | grep -E 'Permissive|Disabled'"
5
+ end
6
+
7
+ template '/etc/selinux/config' do
8
+ @selinux = 'permissive'
9
+ source 'config.erb'
10
+ end
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Selinux
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-selinux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-26 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -69,6 +69,8 @@ files:
69
69
  - lib/itamae/plugin/recipe/selinux/common.rb
70
70
  - lib/itamae/plugin/recipe/selinux/config.erb
71
71
  - lib/itamae/plugin/recipe/selinux/disabled.rb
72
+ - lib/itamae/plugin/recipe/selinux/enforcing.rb
73
+ - lib/itamae/plugin/recipe/selinux/permissive.rb
72
74
  - lib/itamae/plugin/recipe/selinux/version.rb
73
75
  homepage: ''
74
76
  licenses: