ansible/roles/development
ilia adf5ffecf7
Some checks failed
CI / lint-and-test (pull_request) Successful in 1m0s
CI / ansible-validation (pull_request) Successful in 2m11s
CI / secret-scanning (pull_request) Successful in 57s
CI / dependency-scan (pull_request) Successful in 1m2s
CI / sast-scan (pull_request) Successful in 1m55s
CI / license-check (pull_request) Successful in 58s
CI / vault-check (pull_request) Failing after 1m54s
CI / playbook-test (pull_request) Successful in 1m52s
CI / container-scan (pull_request) Successful in 1m26s
CI / sonar-analysis (pull_request) Successful in 2m5s
CI / workflow-summary (pull_request) Successful in 55s
Enhance CI workflow and update Timeshift documentation
- Update CI workflow to skip push events for non-master branches, ensuring only relevant events trigger jobs.
- Improve Timeshift documentation for clarity by splitting long sentences into shorter ones for better readability.
- Maintain consistent formatting in development role tasks by removing unnecessary conflict markers.
2025-12-17 22:59:13 -05:00
..
2025-08-27 02:28:58 +00:00
2025-08-27 02:28:58 +00:00

Role: development

Description

Installs core development tools and utilities for software development. This role provides a lightweight foundation for coding without heavy data science dependencies.

For data science tools (Anaconda, Jupyter, R), see the datascience role.

Requirements

  • Ansible 2.9+
  • Debian/Ubuntu systems
  • Root or sudo access

Installed Components

Development Tools

  • git: Version control system
  • build-essential: C/C++ compilation tools (gcc, g++, make)
  • python3: Python 3 interpreter
  • python3-pip: Python package manager

Node.js

  • Node.js 22.x: Latest LTS from NodeSource
  • npm: Node package manager (included with Node.js)
  • Configured from official NodeSource repository

Code Editors

  • Cursor IDE: AI-powered code editor (AppImage)
    • Installed to /usr/local/bin/cursor
    • Latest stable version from cursor.com

Variables

Core Settings

Variable Default Description
install_cursor true Install Cursor IDE
install_cursor_extensions false Install Cursor extensions

Extension Groups

Enable specific extension groups based on your development needs:

Variable Default Extensions Included
install_python false Python, Pylance, Black, isort, Flake8, Ruff
install_jupyter false Jupyter notebooks, keybindings, renderers
install_web false Prettier, ESLint, Tailwind, Vue, Svelte
install_playwright false Playwright testing framework
install_devops false Go, Rust, YAML, Docker, Ansible
install_r false R language support and pack development
install_docs false Markdown tools and linter

Base Extensions (Always Installed)

When install_cursor_extensions: true, these are always installed:

  • ErrorLens (better error highlighting)
  • GitLens (Git supercharged)
  • Git Graph (visualization)
  • Code Spell Checker
  • EditorConfig support
  • Material Icon Theme
  • GitHub Copilot (if licensed)
  • Copilot Chat

Dependencies

  • base role (for core utilities)

Example Playbook

Basic Installation

- hosts: developers
  roles:
    - role: development

Python Data Science Machine

- hosts: datascience
  roles:
    - role: development
      vars:
        install_cursor_extensions: true
        install_python: true
        install_jupyter: true
        install_docs: true

Web Development Machine

- hosts: webdevs
  roles:
    - role: development
      vars:
        install_cursor_extensions: true
        install_web: true
        install_playwright: true
        install_docs: true

Full Stack with DevOps

- hosts: fullstack
  roles:
    - role: development
      vars:
        install_cursor_extensions: true
        install_python: true
        install_web: true
        install_devops: true
        install_docs: true

Custom Extension List

You can also override the extension list completely in host_vars:

# host_vars/myhost.yml
install_cursor_extensions: true
cursor_extensions:
  - ms-python.python
  - golang.go
  - hashicorp.terraform
  # ... your custom list

With Cursor disabled

- hosts: servers
  roles:
    - role: development
      install_cursor: false

Usage

# Install on specific host
make dev HOST=dev01

# Install only development tools (skip other roles)
ansible-playbook playbooks/development.yml --limit dev01 --tags development

Tags

  • development, dev: All development tasks
  • cursor, ide: Cursor IDE installation only

Post-Installation

Verify Installations

git --version
node --version
npm --version
python3 --version
cursor --version

Node.js Usage

# Install packages globally
npm install -g <package>

# Check Node.js version
node --version  # Should show v22.x

Cursor IDE Usage

# Launch Cursor (if using X11/Wayland)
cursor

# For root users, use the aliased version from .zshrc:
cursor  # Automatically adds --no-sandbox flags

Performance Notes

Installation Time

  • Base packages: 1-2 minutes
  • Node.js: 1-2 minutes
  • Cursor IDE: 2-5 minutes (~200MB download)
  • Total: ~5-10 minutes

Disk Space

  • Node.js + npm: ~100MB
  • Cursor IDE: ~200MB
  • Build tools: ~50MB
  • Total: ~350MB

Integration

With Data Science Role

- hosts: datascience_workstation
  roles:
    - role: development      # Core dev tools
    - role: datascience      # Anaconda, Jupyter, R

With Docker

- hosts: fullstack_dev
  roles:
    - role: development
    - role: docker

Troubleshooting

Node.js Version Issues

If Node.js doesn't upgrade to v22:

# Check current version
node --version

# Force reinstall
apt-get remove nodejs
# Re-run playbook

Cursor Won't Launch

For root users, use the alias that adds required flags:

# Check alias in .zshrc
alias cursor="cursor --no-sandbox --disable-gpu-sandbox..."

Notes

  • Node.js 22 is the current LTS version
  • NodeSource repository is configured for automatic updates
  • Cursor IDE is installed as AppImage for easy updates
  • Build tools (gcc, make) are essential for npm native modules
  • Python 3 is included for development scripts
  • All installations are idempotent (safe to re-run)

Comparison with Data Science Role

Component Development Role Data Science Role
Git -
Node.js -
Build Tools -
Cursor IDE -
Anaconda
Jupyter
R Language
Install Time ~10 min ~30-60 min
Disk Space ~350MB ~3GB

Recommendation: Use development role for general coding. Add datascience role only when needed for data analysis/ML work.