https://github.com/loksonarius/workstation-setup
Ansible playbooks to configure my development machines
https://github.com/loksonarius/workstation-setup
ansible ansible-playbook ansible-role configuration-management dotfiles
Last synced: about 1 year ago
JSON representation
Ansible playbooks to configure my development machines
- Host: GitHub
- URL: https://github.com/loksonarius/workstation-setup
- Owner: loksonarius
- License: mit
- Archived: true
- Created: 2019-10-22T19:11:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T21:00:21.000Z (about 2 years ago)
- Last Synced: 2025-02-24T05:12:41.948Z (over 1 year ago)
- Topics: ansible, ansible-playbook, ansible-role, configuration-management, dotfiles
- Language: Lua
- Homepage:
- Size: 90.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# workstation-config
_Ansible playbooks to set up my development machines_
## Bootstrap
Run `./bootstrap.sh` to install the tooling needed to run the setup playbook.
## Running
### tl;dr
```bash
source venv/bin/activate
ansible-playbook setup.yaml
```
### Install Binaries
```bash
source venv/bin/activate
ansible-playbook --tags install setup.yaml
```
### Configure Tooling
```bash
source venv/bin/activate
ansible-playbook --tags configure setup.yaml
```
## Repo Layout
```
.
├── LICENSE
├── README.md
├── ansible.cfg # Configures options used by ansible-playbook
├── bootstrap.sh # Run this to get Ansible ready to roll
├── inventory # Explicitly delcares and configures localhost inventory
├── requirements.txt # Requirements file for Ansible venv
├── roles
│ └── workstation # Contains bulk of configuration code
└── setup.yaml # Entry point for configuration code
```
## Iteration
Testing changes for this repo should occur on a local dev machine. Currently,
most of the configuration code is specific to OSX, so that's something to keep
in mind if ever working on getting the workstation role to be OS-agnostic.
To test changes, run the `setup.yaml` playbook as described in the above usage
instructions and check to ensure whatever changes you made worked.
Aditionally, the `requirements.txt` file will install `ansible-lint` and
`yamllint` to the tools installed by pip into `venv`. Before committing code,
run the following to check for lint errors:
```bash
# Lint Ansible
ansible-lint setup.yaml roles/*
# Lint YAML
yamllint .
```
## Upgrading
Mildly destructive, but if you're looking to upgrade the `ansible` version being
used by this repo, try:
```bash
# delete the current venv on disk
rm -rf venv
# create a new venv with a fresh pip installation
python3 -m venv --prompt workstation-venv venv
source venv/bin/activate
pip install --upgrade pip
# install the project dependencies
pip install ansible yamllint
# freeze the newly set dependency versions
pip freeze > requirements.txt
```
[:heart:](README.md)