Christoph Hartmann
af8bca193a
add support to hash commands in mock backend
2015-10-05 11:50:49 +02:00
Christoph Hartmann
4c43c88778
implement basic user resource for linux and mac
2015-10-05 11:42:19 +02:00
Dominik Richter
938d13a7dc
switch from open4 -> mixlib-shellout
2015-10-04 23:24:17 +02:00
Dominik Richter
fede3fb9fd
use target path in configuring specinfra winrm
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-03 23:56:46 +02:00
Dominik Richter
369e61d0cd
feature: add path to target specification
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-03 23:39:09 +02:00
Dominik Richter
7d27b62794
simplify key assignment in conf
2015-10-02 22:41:25 +02:00
Dominik Richter
5825b4d6d4
rename --key-file to --key on cli
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-02 22:21:35 +02:00
Dominik Richter
ae10fefd15
fix warnings
2015-10-01 16:43:36 +02:00
Dominik Richter
12888c8dad
bugfix: centos detection in docker centos:7.1.1503
...
It doesnt post the expected information in /etc/redhat-release:
Derived from Red Hat Enterprise Linux 7.1 (Source)
Additionally in /etc/os-release:
NAME="CentOS Linux"
VERSION="7 (Core)"
...
Combine both files to fix the detection.
2015-09-30 13:44:24 +02:00
Dominik Richter
90de8763cf
wrap up linting
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-30 02:20:47 +02:00
Dominik Richter
212f11243b
simplify and fix stat handling
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-30 01:42:04 +02:00
Dominik Richter
28b3792325
let specinfra backend os support OSCommon methods
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-29 19:34:43 +02:00
Dominik Richter
3508201a5d
split out unix stat
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-29 19:18:48 +02:00
Dominik Richter
15d5cc7ca0
split up specinfra backend helper
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-29 15:27:58 +02:00
Dominik Richter
1e0405bf74
allow for empty config in target_config
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 13:03:05 +02:00
Dominik Richter
78d98388f8
add amazon scientific and xenserver to redhat distros in detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 12:46:46 +02:00
Dominik Richter
4e15e425a4
move darwin to bsd type
...
see: https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#/media/File:Unix_timeline.en.svg
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 12:14:40 +02:00
Dominik Richter
4f0c0d7f21
add unit tests to os common detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:52:50 +02:00
Dominik Richter
c77a0a1c81
api: make mock backend quiet by default
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:27:19 +02:00
Dominik Richter
7019b1f659
generalize and simplify os detect methods
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:15:41 +02:00
Dominik Richter
2eb94f5e2e
be more explicit about detecting unix
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:06:38 +02:00
Dominik Richter
bc98b3330f
feature: add helpers for OS families
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:06:38 +02:00
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