Skip to content

Instantly share code, notes, and snippets.

@kbariotis
kbariotis / main.yaml
Last active Apr 28, 2022
Ansible playbook for deploying a Node.js app to DigitalOcean
View main.yaml
- name: DO
hosts: localhost
vars:
project_name: "PUT A NAME FOR YOUR PROJECT HERE"
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens"
repository: "PUT YOUR REPOSITORY URL HERE"
tasks:
- name: LOCAL | Generate SSH key
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N ""