README.md in chef-sugar-3.1.1 vs README.md in chef-sugar-3.2.0
- old
+ new
@@ -80,10 +80,11 @@
- `_32_bit?`
- `intel?`
- `sparc?`
- `ppc64?`
- `ppc64le?`
+- `powerpc?`
#### Examples
```ruby
execute 'build[my binary]' do
command '...'
@@ -247,10 +248,35 @@
end
end
end
```
+### Init
+- `systemd?` - detect if init system is systemd
+- `upstart?` - detect if init system is upstart
+- `runit?` - detect if init system is runit
+
+#### Examples
+```ruby
+systemd_service 'my-service' do
+ description 'My Service'
+ install do
+ wanted_by 'multi-user.target'
+ end
+ service do
+ exec_start '/usr/bin/myserviced'
+ end
+ action [:create, :enable, :start]
+ only_if { systemd? }
+end
+
+cookbook_file '/etc/init/my-service.conf' do
+ source 'my-service.conf'
+ only_if { upstart? }
+end
+```
+
### IP
- `best_ip_for` - determine the best IP address for the given "other" node, preferring local IP addresses over public ones.
#### Examples
```ruby
@@ -294,10 +320,13 @@
- `ubuntu?`
- `solaris2?`
- `aix?`
- `smartos?`
- `omnios?`
+- `raspbian?`
+- `nexus?`
+- `ios_xr?`
There are also a series of dynamically defined matchers that map named operating system release versions and comparison operators in the form "#{platform}\_#{operator}\_#{name}?". For example:
- `debian_after_squeeze?`
- `linuxmint_after_or_at_olivia?`
@@ -332,10 +361,11 @@
- `openbsd?`
- `rhel?`
- `slackware?`
- `suse?`
- `windows?`
+- `wrlinux?`
#### Examples
```ruby
node['attribute'] = if windows?
'C:\Foo\BarDrive'
@@ -402,9 +432,10 @@
### Virtualization
- `kvm?`
- `lxc?`
- `virtualbox?`
- `vmware?`
+- `openvz?`
#### Examples
```ruby
service 'ntpd' do
action [:enable, :start]