Dominik Richter
093600b85f
split up os detection for linting
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-26 13:12:52 +02:00
Dominik Richter
d839cbc8f7
lint the profile context
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-26 12:41:13 +02:00
Christoph Hartmann
94ac889ff2
fix robocop lint issues
2015-09-25 19:46:46 +02:00
Dominik Richter
3fe0c90733
overhaul rule structure
...
* rename VulcanoBaseRule -> Vulcano::Rule
* initialize rule inside the ProfileContext
* attach all resources to ProfileContext and all rules created within
* rename rule.rb -> dsl.rb, now only containing DSL information
* rename base_rule.rb -> rule.rb, now containing everything for rule
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 19:16:32 +02:00
Dominik Richter
6d7a46a589
bugfix: do not allocate pty on ssh by default
...
PTY will effectively disable stderr output, so avoid it for now.
It will come up very soon when we get back to sudo; see if fifo or other solutions might be used. Stderr is important for accurate command execution...
For reference see this wonderful explanation:
http://unix.stackexchange.com/a/134169
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 13:25:57 +02:00
Dominik Richter
c3d226e4a2
add os detection to ssh backend
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 12:37:37 +02:00
Dominik Richter
8fe3b8ad4d
add ssh configuration options
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 12:37:35 +02:00
Dominik Richter
a051224462
improvement: be explicit on specinfra file content handling
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 09:55:48 +02:00
Dominik Richter
773548551d
bugfix: specinfra file handling on bsd over ssh
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 01:16:39 +02:00
Dominik Richter
5ed71ef444
bugfix: error handling on file backend in specinfra
2015-09-24 22:46:02 +02:00
Dominik Richter
1e5fc59fa8
bugfix: handle selinux label (null)
...
Return nil instead of (null), as it is a special output of stat.
2015-09-24 10:36:21 +02:00
Dominik Richter
7a6675394c
bugfix: linux file dont return selinux label ?
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-24 10:36:21 +02:00
Dominik Richter
3ed1c29039
bugfix: linux file content for folder/missing
...
Dont return empty strings when reading a directory or if the path doesnt exist. Instead return nil.
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-24 10:36:21 +02:00
Christoph Hartmann
c187230336
implement port resource for linux
2015-09-23 18:12:51 +02:00
Christoph Hartmann
52f7ddd899
add comment windows version determination
2015-09-23 13:24:55 +02:00
Christoph Hartmann
18e420bb31
remove windows 2003 r2, shares the same version number as windows 2003, only distinguishes via build number
2015-09-23 13:23:03 +02:00
Dominik Richter
ab155f7db6
bugfix: windows server 2008 detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-23 10:38:46 +02:00
Dominik Richter
7ccd88f1a2
improvement: os detection on unix
...
provided the platform family hint == "unix" run tests for all supported unix systems
also clarify the role of linux detection as the last step
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 19:43:11 +02:00
Dominik Richter
a9c129540b
bugfix: file common for linked_to? tests
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 19:43:11 +02:00
Dominik Richter
f472e8a5c0
expose os to docker backend
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 19:43:11 +02:00
Dominik Richter
5fec383788
bugfix: detect os via unames
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 16:25:17 +02:00
Dominik Richter
c3fa247e6a
bugfix: local file owner
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 14:24:22 +02:00
Christoph Hartmann
cf3dddf1a3
add csv support
2015-09-22 02:27:04 +02:00
Christoph Hartmann
b9d4fc6d8c
add yaml resource
2015-09-22 02:27:04 +02:00
Christoph Hartmann
0e43d4ca6a
add json resource
2015-09-22 02:27:04 +02:00
Christoph Hartmann
42a989606b
implement kernel_parameter resource
2015-09-22 02:27:04 +02:00
Christoph Hartmann
ef9471e86c
implement kernel_module resource
2015-09-22 02:27:04 +02:00
Dominik Richter
c56dee4d0f
implement fake os method for mock backend
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Christoph Hartmann
8b6fccee92
implement windows_feature resource
2015-09-22 02:27:03 +02:00
Dominik Richter
0b7eb60028
File.exists? is deprecated in ruby 2.1
...
See:
http://ruby-doc.org/core-2.1.0/File.html#method-c-exists-3F
Same for Dir:
http://ruby-doc.org/core-2.1.0/Dir.html#method-c-exists-3F
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Dominik Richter
13f7429509
remove commented fedora code
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:03 +02:00
Dominik Richter
e78fbf1b96
move windows OS detection to backend
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
f0215a4380
specinfra backwards compatibility for darwin/osX
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
0ed2f1b535
fix inverted darwin detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Dominik Richter
ca753cdb83
feature: add os resource
2015-09-22 02:27:02 +02:00
Dominik Richter
50dd82e150
feature: OS detection
2015-09-22 02:27:02 +02:00
Christoph Hartmann
34889913b4
bugfix: fix simplified runner configuration
2015-09-22 02:27:02 +02:00
Dominik Richter
9de015ae2d
improvement: simplify runner configuration
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:02 +02:00
Christoph Hartmann
e06eed2178
Merge pull request #19 from chef/improvements
...
Improvements
2015-09-22 02:27:01 +02:00
Dominik Richter
535bddd944
move out local file user/group name
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:01 +02:00
Dominik Richter
9608e2e29b
bugfix: specinfra selinux label handling
...
as specinfra doesnt work with respond_to?, just call the method and catch the error.
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
6c29580de0
enforce file content encoding to utf8
...
this is also in line with specinfra compatibility
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
c06fe38981
bugfix: dont strip specinfra file content output
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
61e7559489
fix bsd stat detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
13ce808a90
bugfix: specinfra is missing methods for freebsd
...
Add getter for user/group/mode for freebsd, as specinfra will execute these calls but not return anything.
2015-09-22 02:27:00 +02:00
Dominik Richter
a1a0e10c5a
extend linux file with bsd stat
...
TODO: we must start separating between the different UNIXes and maybe call this something better than LinuxFile, but for now: since most of the things will stay the same, add the bsd stat command as an alternative to the linux stat command and parse its output.
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Dominik Richter
82f89aa1db
bugfix: dont fail on specinfra selinux_label on freebsd
...
the call shouldnt be made, but in case it is, dont just fail mit NoMethodError
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:27:00 +02:00
Christoph Hartmann
21040b9b03
implement service resource for windows
2015-09-22 02:26:59 +02:00
Dominik Richter
f18381a7d3
return nil for specinfra content on directories
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:26:59 +02:00
Dominik Richter
7137a9625b
expose backend file path
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:26:58 +02:00