Skip to content

Commit

Permalink
Added a groovy version of fucking_coffee
Browse files Browse the repository at this point in the history
  • Loading branch information
gandrianakis committed Dec 7, 2015
1 parent c300bc5 commit 7669e87
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions groovy/fucking_coffee.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@Grab(group='org.hidetake', module='groovy-ssh', version='1.1.8')
@GrabExclude('org.codehaus.groovy:groovy-all')
import org.hidetake.groovy.ssh.Ssh

final def ssh = Ssh.newService()

final def HOST = '10.10.42.42'
final def USER = 'my_username'
final def PASSWORD = '1234'
final def DELAY = 24

ssh.remotes {
webServer {
host = HOST
user = USER
password = PASSWORD
}
}

ssh.run {
session(ssh.remotes.webServer) {
execute 'sys brew'
execute "sleep ${DELAY}s"
execute 'sys pour'
}
}

0 comments on commit 7669e87

Please sign in to comment.