mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-22 18:37:10 +00:00
Added a groovy version of fucking_coffee
This commit is contained in:
parent
c300bc5996
commit
7669e87e0a
26
groovy/fucking_coffee.groovy
Normal file
26
groovy/fucking_coffee.groovy
Normal file
@ -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'
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user