Sha256: c24cfa23da1e4589dfe9d573227898293ad5025b1898957d0f9f421135d64e8d

Contents?: true

Size: 800 Bytes

Versions: 19

Compression:

Stored size: 800 Bytes

Contents

#!/usr/bin/env ruby 
require 'whiskey_disk/helpers'

# simple command-line script to detect whether this deployment target
# is in a specified whiskey_disk role.  sets exit status appropriately
#
# useful for conditionalizing shell scripting based on roles.

role = ARGV.shift
exit(1) unless role?(role)

__END__

( this example session presumes you `gem install rockhands` first... )

$ export WD_ROLES='app:db'
$ wd_role web && rock || shocker
     .-.     
   .-.U|     
   |U| | .-. 
   | | |_|U| 
   | | | | | 
  /|     ` |
 | |       | 
 |         | 
  \        / 
  |       |  
  |       |  
             
$ wd_role app && rock || shocker
   .-.       
   |U|       
   | |   .-. 
   | |-._|U| 
   | | | | | 
  /|     ` | 
 | |       | 
 |         | 
          / 
  |       |  
  |       |  

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
ol-whisk_deploy-0.6.25 bin/wd_role
ol-whisk_deploy-0.6.26 bin/wd_role
whisk_deploy-0.6.26 bin/wd_role
whiskey_disk-0.6.24 bin/wd_role
whiskey_disk-0.6.23 bin/wd_role
whiskey_disk-0.6.22 bin/wd_role
whiskey_disk-0.6.21 bin/wd_role
whiskey_disk-0.6.20 bin/wd_role
whiskey_disk-0.6.17 bin/wd_role
whiskey_disk-0.6.16 bin/wd_role
whiskey_disk-0.6.15 bin/wd_role
whiskey_disk-0.6.14 bin/wd_role
whiskey_disk-0.6.13 bin/wd_role
whiskey_disk-0.6.12 bin/wd_role
whiskey_disk-0.6.11 bin/wd_role
whiskey_disk-0.6.10 bin/wd_role
whiskey_disk-0.6.4 bin/wd_role
whiskey_disk-0.6.3 bin/wd_role
whiskey_disk-0.6.2 bin/wd_role