foreman_users 0.0.27 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -0
- data/app/models/foreman_users/syuser.rb +19 -14
- data/lib/foreman_users/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -17,21 +17,26 @@ class ForemanUsers::Syuser < ActiveRecord::Base
|
|
17
17
|
dir_exist_status = File.exist?(root_dir_name) #判断该目录是否存在
|
18
18
|
if !dir_exist_status
|
19
19
|
#创建目录结构
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
Dir::mkdir(root_dir_name)
|
21
|
+
if !File.exist?(root_dir_name + "/files")
|
22
|
+
Dir::mkdir(root_dir_name + "/files")
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
if !File.exist?(root_dir_name + "/manifests")
|
26
|
+
Dir::mkdir(root_dir_name + "/manifests")
|
27
|
+
end
|
28
|
+
|
29
|
+
#生成files下welcome.conf文件
|
30
|
+
files_welcome_File = File.new(root_dir_name + "/files/welcome.conf", "w+")
|
31
|
+
files_welcome_File.close
|
32
|
+
#生成manifests下init.pp文件
|
33
|
+
main_init_File = File.new(root_dir_name +"/manifests/init.pp", "w+")
|
34
|
+
if main_init_File
|
35
|
+
main_init_File.syswrite(self.create_content)
|
36
|
+
else
|
37
|
+
puts "Unable to open file!"
|
38
|
+
end
|
39
|
+
main_init_File.close
|
35
40
|
end
|
36
41
|
end
|
37
42
|
|