bash
pip install gunny
yaml
environments:
production:
hosts:
- 192.168.0.1
user: username
keyfile: /path/to/private/key.pem
python
from gunny import Task
class DeployNginxTask(Task):
name = 'deploy-nginx'
def run(self):
self.sudo('apt-get update')
self.sudo('apt-get install nginx')
self.sudo('service nginx start')
self.put('/path/to/nginx.conf', '/etc/nginx/nginx.conf')
self.sudo('service nginx restart')
bash
gunny run production deploy-nginx