Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

A collection of Ansible playbooks for my server

License

Notifications You must be signed in to change notification settings

collinbarrett/cbhost-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cbhost-ansible

Ansible playbooks for a multi-purpose personal server.

Managed Node Setup

Use a single DigitalOcean Ubuntu LTS droplet as a host. Include a public SSH key stored with DigitalOcean when creating the droplet. Enable droplet backups.

Control Node Setup

As primarily a .NET developer, I use a Windows development environment.

Windows is not supported for the control node. Ansible Docs

So, to get up and running, I am using WSL.

Enable and Install WSL

Follow the official docs for getting WSL up and running. Use the latest Ubuntu LTS image.

Install Ansible inside WSL

via Ansible Docs

SSH Keys

  • cp /path/to/id_rsa.pub ~/.ssh/id_rsa.pub
  • cp /path/to/id_rsa ~/.ssh/id_rsa
  • chmod 700 ~/.ssh
  • chmod 644 ~/.ssh/id_rsa.pub
  • chmod 600 ~/.ssh/id_rsa

git clone

Clone this cbhost-ansible repo into a directory inside of the WSL instance.

Inventory

Add the IP of the managed node droplet to /etc/ansible/hosts inside WSL.

Common Ansible Commands for Running/Debugging

  • ansible all -m ping -u root
  • ansible all -m ping
  • ansible-playbook 00-cbhost.yml