Skip to content

Commit

Permalink
feat!: massive refactoring and enhancement
Browse files Browse the repository at this point in the history
Drop linux support as it complexifies code and is never used.
Replace deprecated antigen zsh package manager by antidote.
Replace Ppwerlevel10k prompt by starship.
Replace iTerm2 terminal app by alacritty.
Replace docker by podman.
Use zellij as terminal multiplexer.
And more...

Closes #51, #50, #23, #19, #18, #17, #15
  • Loading branch information
bsemp committed Jun 10, 2023
1 parent 4c01b4c commit 8521f2e
Show file tree
Hide file tree
Showing 104 changed files with 2,508 additions and 2,500 deletions.
12 changes: 9 additions & 3 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
profile: production

exclude_paths:
- .github
- roles/**/files

warn_list:
- no-changed-when # Commands should not change things if nothing needs doing
- no-changed-when # Commands should not change things if nothing needs doing

skip_list:
- unnamed-task # All tasks should be named
- package-latest # Package installs should not use latest
- unnamed-task # All tasks should be named
- package-latest # Package installs should not use latest
59 changes: 19 additions & 40 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@ env:
PYTHON_VERSION: 3.11

jobs:
dependencies:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
lint:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -44,7 +41,7 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3.3.1
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -53,48 +50,24 @@ jobs:
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

lint:
needs: [dependencies]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up python
uses: actions/[email protected]
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Run lint
run: poetry run ansible-lint

test:
needs: [dependencies]
deploy:
needs: lint
runs-on: ${{ matrix.os }}
timeout-minutes: 120
if: ${{ github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
os: [macOS-latest]
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand All @@ -107,10 +80,16 @@ jobs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3.3.1
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

- name: Install playbook
run: poetry run ansible-playbook playbooks/main.yml -vv
run: |
export HOMEBREW_NO_AUTO_UPDATE=1
poetry run ansible-playbook playbooks/main.yml -vv
9 changes: 0 additions & 9 deletions .yamllint

This file was deleted.

26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# workstation-bootstrap
# Dotfiles

[![Test](https://github.com/bsemp/workstation-bootstrap/actions/workflows/test.yaml/badge.svg)](https://github.com/bsemp/workstation-bootstrap/actions/workflows/test.yaml)
[![Test](https://github.com/bsemp/dotfiles/actions/workflows/test.yaml/badge.svg)](https://github.com/bsemp/dotfiles/actions/workflows/test.yaml)

## Prerequisites

### Install brew (macos)

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

### Setup python venv
Expand Down Expand Up @@ -53,10 +53,12 @@ poetry run ansible-playbook playbooks/main.yml --list-tags

Example:

playbook: playbooks/main.yml
```bash
playbook: playbooks/main.yml

play #1 (all): Setup workstation TAGS: []
TASK TAGS: [azure, cli-tools, docker, fonts, git, gnu-tools, gpg, homebrew-update, iterm2, javascript, kubernetes, python, screen, ssh, terraform, vim, zsh]
play #1 (all): Setup workstation TAGS: []
TASK TAGS: [akamai, alacritty, always, azure, cli-tools, docker, fonts, git, gpg, homebrew-update, iterm2, javascript, kubernetes, nvim, python, ssh, terraform, vim, zsh]
```

#### Install selected components

Expand All @@ -66,4 +68,14 @@ poetry run ansible-playbook playbooks/main.yml -t <tag>,<tag>

Example:

`poetry run ansible-playbook playbooks/main.yml -t kubernetes,terraform`
```bash
poetry run ansible-playbook playbooks/main.yml -t kubernetes,terraform
```

## Development

### Code lint

```bash
poetry run ansible-lint
```
11 changes: 11 additions & 0 deletions host_vars/localhost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
home_directory: "{{ ansible_env.HOME }}"
# XDG environment variables (https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html)
xdg_data_home: "{{ home_directory }}/.local/share"
xdg_config_home: "{{ home_directory }}/.config"
xdg_state_home: "{{ home_directory }}/.local/state"
xdg_data_dirs: "/usr/local/share/:/usr/share/"
xdg_config_dirs: "/etc/xdg"
xdg_cache_home: "{{ home_directory }}/.cache"
xdg_runtime_dir: ""

shell_config_dir: "{{ xdg_config_home }}/shell_config"
Loading

0 comments on commit 8521f2e

Please sign in to comment.