Code Monkey home page Code Monkey logo

devmachine's Introduction

Devmachine

A collection of Ansible playbooks to automate common tasks on my development machines. These are used on MacOS (Big Sur), Ubuntu, and Ubuntu via WSL.

You probably don't want to use this directly because it's highly specific to my current workflow. The best way to use these would be to fork and modify or to scan and steal the bits you need.

Features

  • Syncing dotfiles
  • MacOS settings configuration
  • Creating SSH key and linking it to GitHub
  • Installing binaries, pulling source code repos, and placing configuration files
  • Install VS Code and VS Code extensions

Bootstrapping

Ubuntu 20+

sudo apt-get install unzip ansible # Installs requirements
ansible-galaxy collection install -r requirements.yaml

# Set GH_TOKEN environment variable from secret.
# export GH_TOKEN=XXXXXXXX
export XDG_CONFIG_HOME=$HOME/.config

# Bootstrap a new machine, probably only need to run once.
ansible-playbook --tags=all,init --ask-become-password devmachine.yaml

Usage

The GitHub module requires an authentication token from GitHub with permissions to add/modify ssh keys for the account. You can provide that token by setting the GH_TOKEN environment variable.

Before running, you must create a user.yaml file in the vars/ directory to provide additional values.

# Install collection dependencies.
ansible-galaxy collection install -r requirements.yaml

# Only updates dotfiles.
ansible-playbook --tags=dotfiles-only devmachine.yaml

# Updates packages, repos, and binaries installed through these tasks.
ansible-playbook devmachine.yaml

Customization

You can provide a POST-INSTALL.sh script in the root directory of this repo in order to do some additional configuration that will run each time the dotfiles sync.

For example, you could use it to update personal git information.

#!/usr/bin/env bash

git config --global user.name "John Doe"
git config --global user.email "[email protected]"
git config --global user.signingkey "XXXXXXXXXXXXXX"

Notes

devmachine's People

Contributors

allancalix avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.