Skip to content

witoszekdev/ansible

Repository files navigation

Ansible

My Ansible configuration

First startup - macOS

aka. stuff that you need to do manually

Ansible Docs

  1. Install Ansible
pip3 install ansible

Note: There can be some schenanigans with python packages not being in the PATH. In order to fix that look where ansible was installed. On macOS it should be in ~/Library/Python/.../bin. Check if that path is PATH configured in the .bashrc or .zshrc Or just add Python to your PATH: export PATH="$HOME/Library/Python/3.8/bin:/opt/homebrew/bin:$PATH"

  1. Install required Ansible Galaxy roles
ansible-galaxy install -r requirements.yml
  1. Run Ansible
ansible-playbook local.yml --ask-become-pass --ask-vault-pass

Enter your macOS account password when prompted for the "BECOME" password Enter my super secret password when prompted for "Vault" password

Note: To skip tasks that require vault password use --skip-tags vault

Testing configuration

Use Docker for testing if the configuration works fine. The image uses Ubuntu Focal (not macOS!)

Build Docker image

./build-docker

Run Docker container

./run-docker

To test fully you'll need a Virtual machine

Tags

These are the avilable tags to run the playbook partially:

  • homebrew - packages installed using homebrew
  • appstore - apps installed from AppStore
  • dock - dock configuration
  • macos - macOS preferences configuration
  • terminal - setting up zsh
  • extra-packages - extra packages that are installed using other packages manager or built from source
  • dotfiles - dotfiles cloned from separate repository
  • vault - tasks that require vault password
    • ssh - task that installs my ssh key
    • gpg - task that installs my gpg key

Inspired by

Those are the ansible configurations that were an inspiration to mine (aka I've stolen the parts that I liked)

About

Ansible configuration for my work environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published