diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 66c57a11..dfaeffd2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,10 +27,10 @@ jobs: steps: - uses: actions/checkout@v6.0.1 - - name: Set up Python 3.14 + - name: Set up Python 3.13 uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" - name: Install system deps shell: bash diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index eb1ba8c6..35f5d324 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -14,10 +14,10 @@ jobs: with: ref: develop - - name: Set up Python 3.14 + - name: Set up Python 3.13 uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" - name: Install system deps shell: bash diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f3092fd4..ebffb403 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v6.0.1 - - name: Set up Python 3.14 + - name: Set up Python 3.13 uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" - name: Install system deps shell: bash @@ -49,10 +49,10 @@ jobs: steps: - uses: actions/checkout@v6.0.1 - - name: Set up Python 3.14 + - name: Set up Python 3.13 uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" - name: Install system deps shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f241cd..10402d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- MacOS Tools/Packages: + * opencode. + * godot. + ### Changed - Python default versions instaled with pyenv to (`3.11`, `3.12`, `3.13`, `3.14`). - Updated dev dependencies. diff --git a/default.macos.config.yml b/default.macos.config.yml index 52a80766..f8097915 100644 --- a/default.macos.config.yml +++ b/default.macos.config.yml @@ -1,7 +1,7 @@ --- # Homebrew Configuration # These settings configure the Homebrew package manager and its installations. -homebrew_prefix: "{{ (ansible_machine == 'arm64') | ternary('/opt/homebrew', '/usr/local') }}" +homebrew_prefix: "{{ (ansible_facts['machine'] == 'arm64') | ternary('/opt/homebrew', '/usr/local') }}" homebrew_install_path: "{{ homebrew_prefix }}/Homebrew" homebrew_brew_bin_path: "{{ homebrew_prefix }}/bin" homebrew_brew_sbin_path: "{{ homebrew_prefix }}/sbin" @@ -39,6 +39,8 @@ homebrew_installed_packages: - fish - starship - btop + - opencode + - godot # Homebrew Cask Applications # Directory for Cask applications and list of applications to install. diff --git a/docs/configuration/index.md b/docs/configuration/index.md index f1bb14e0..1360da00 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -69,7 +69,7 @@ Below is a list of the key default variables available in `default.macos.config. - neovim - tmux - chezmoi - - jesseduffield/lazydocker/lazydocker + - lazydocker - sshpass - htop - dust @@ -78,6 +78,8 @@ Below is a list of the key default variables available in `default.macos.config. - fish - starship - btop + - opencode + - godot ``` - `homebrew_cask_appdir`: Directory where cask applications will be installed. @@ -278,7 +280,7 @@ a `.config.yml` file and setting the overrides in that file. e.g.: - neovim - tmux - chezmoi - - "jesseduffield/lazydocker/lazydocker" + - lazydocker - sshpass - htop - dust @@ -287,9 +289,10 @@ a `.config.yml` file and setting the overrides in that file. e.g.: - fish - starship - btop - - awscli - - tfenv + - opencode + - godot - ffmpeg + - duckdb homebrew_cask_apps: - firefox diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 3cc9906c..18faf534 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -12,7 +12,7 @@ ansible.builtin.apt: update_cache: true cache_valid_time: 3600 - when: ansible_os_family == 'Debian' + when: ansible_facts['os_family'] == 'Debian' - name: Ensure build dependencies are installed (Debian). ansible.builtin.package: @@ -20,7 +20,7 @@ - openssh-server - openssh-client state: present - when: ansible_os_family == 'Debian' + when: ansible_facts['os_family'] == 'Debian' - name: Ensure auth.log file is present. ansible.builtin.copy: @@ -28,7 +28,7 @@ content: "" force: false mode: 0644 - when: ansible_distribution == 'Debian' + when: ansible_facts['distribution'] == 'Debian' - name: Import main Playbook ansible.builtin.import_playbook: ../../playbooks/main.yml diff --git a/playbooks/macos.yml b/playbooks/macos.yml index 86965d65..cac69c3f 100644 --- a/playbooks/macos.yml +++ b/playbooks/macos.yml @@ -15,7 +15,7 @@ - name: Installs Rosetta 2 ansible.builtin.command: /usr/sbin/softwareupdate --install-rosetta --agree-to-license changed_when: false - when: ansible_distribution == "MacOSX" and ansible_architecture == "arm64" + when: ansible_facts["distribution"] == "MacOSX" and ansible_facts["architecture"] == "arm64" tags: ['always'] roles: @@ -25,31 +25,31 @@ - role: geerlingguy.mac.mas environment: # Fix first run path - PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}" + PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}" when: (mas_installed_apps | default([]) | length > 0) or (mas_installed_app_ids | default([]) | length > 0) tags: ['mas'] - role: geerlingguy.mac.dock environment: # Fix first run path - PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}" + PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}" when: configure_dock tags: ['dock'] - role: fedejaure.dev_setup.oh_my_zsh environment: # Fix first run path - PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}" + PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}" tags: ['oh-my-zsh'] - role: fedejaure.dev_setup.pyenv environment: # Fix first run path - PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_env.PATH }}" + PATH: "{{ homebrew_brew_bin_path }}:{{ homebrew_brew_sbin_path }}:/usr/local/bin:{{ ansible_facts['env']['PATH'] }}" tags: ['pyenv'] tasks: - name: Configure Homebrew bin rc PATH ansible.builtin.lineinfile: - path: "{{ ansible_env.HOME }}/.zshrc" + path: "{{ ansible_facts['env']['HOME'] }}/.zshrc" line: 'export PATH="{{ homebrew_brew_bin_path }}:$PATH"' insertbefore: "^# BEGIN PYENV" tags: ['homebrew'] @@ -57,7 +57,7 @@ - name: Configure Homebrew sbin rc PATH ansible.builtin.lineinfile: - path: "{{ ansible_env.HOME }}/.zshrc" + path: "{{ ansible_facts['env']['HOME'] }}/.zshrc" line: 'export PATH="{{ homebrew_brew_sbin_path }}:$PATH"' insertbefore: "^# BEGIN PYENV" tags: ['homebrew'] @@ -65,8 +65,8 @@ - name: Configure pipx bin rc PATH ansible.builtin.lineinfile: - path: "{{ ansible_env.HOME }}/.zshrc" - line: 'export PATH="$PATH:{{ ansible_env.HOME }}/.local/bin"' + path: "{{ ansible_facts['env']['HOME'] }}/.zshrc" + line: "export PATH=\"$PATH:{{ ansible_facts['env']['HOME'] }}/.local/bin\"" insertbefore: "^# BEGIN PYENV" tags: ['pipx'] when: configure_pipx_bin_rc_path diff --git a/poetry.lock b/poetry.lock index 4d915a78..bb56fba2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -91,9 +91,10 @@ filelock = ">=3.8.2" jsonschema = ">=4.10.0" packaging = ">=22.0" pathspec = ">=0.10.3" -pyyaml = {version = ">=6.0.1", markers = "python_version >= \"3.14\""} +pyyaml = {version = ">=6.0.1", markers = "python_version < \"3.14\""} referencing = ">=0.36.2" ruamel-yaml = ">=0.18.11" +ruamel-yaml-clib = {version = ">=0.2.12", markers = "python_version < \"3.14\""} subprocess-tee = ">=0.4.1" wcmatch = {version = ">=8.5.0", markers = "python_version >= \"3.12\""} yamllint = ">=1.34.0" @@ -2372,7 +2373,7 @@ files = [ {file = "ruamel_yaml_clib-0.2.15-cp39-cp39-win_amd64.whl", hash = "sha256:27dc656e84396e6d687f97c6e65fb284d100483628f02d95464fd731743a4afe"}, {file = "ruamel_yaml_clib-0.2.15.tar.gz", hash = "sha256:46e4cc8c43ef6a94885f72512094e482114a8a706d3c555a34ed4b0d20200600"}, ] -markers = {lint = "platform_python_implementation == \"CPython\" and platform_system != \"Windows\"", security = "platform_python_implementation == \"CPython\""} +markers = {lint = "platform_system != \"Windows\"", security = "platform_python_implementation == \"CPython\""} [[package]] name = "ruff" @@ -2747,5 +2748,5 @@ dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"] [metadata] lock-version = "2.1" -python-versions = "<3.15,>=3.14" -content-hash = "0d0b4d2855c0266e0ea2c26cf055a09e3d4ba2bb67471376498ec480efbf78af" +python-versions = "<3.14,>=3.13" +content-hash = "ff0f0cf76f8dbdd6bc9d04ab4c95e0e6cbf37f5cbf61d0db6e8b644c6719fb35" diff --git a/pyproject.toml b/pyproject.toml index c6835bdb..a5221691 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ package-mode = false "Bug Tracker" = "https://github.com/fedejaure/dev-setup/issues" [tool.poetry.dependencies] -python = "<3.15,>=3.14" +python = "<3.14,>=3.13" ansible = "^13.1.0" [tool.poetry.group.dev.dependencies] @@ -69,7 +69,7 @@ select = [ "ISC", # flake8-implicit-str-concat "RUF", # Ruff-specific rules ] -ignore = ["ANN101", "D203", "D213"] +ignore = ["D203", "D213"] unfixable = [ "ERA", # Don't remove commented-out code ] diff --git a/roles/oh_my_zsh/defaults/main.yml b/roles/oh_my_zsh/defaults/main.yml index 165dd297..f3b92fcb 100644 --- a/roles/oh_my_zsh/defaults/main.yml +++ b/roles/oh_my_zsh/defaults/main.yml @@ -1,2 +1,2 @@ --- -oh_my_zsh_root: "{{ ansible_env.HOME }}/.oh-my-zsh" +oh_my_zsh_root: "{{ ansible_facts['env']['HOME'] }}/.oh-my-zsh" diff --git a/roles/oh_my_zsh/tasks/macos.yml b/roles/oh_my_zsh/tasks/macos.yml index 32a08cf5..7e922358 100644 --- a/roles/oh_my_zsh/tasks/macos.yml +++ b/roles/oh_my_zsh/tasks/macos.yml @@ -4,11 +4,11 @@ with_first_found: - files: - macos.yml - when: ansible_distribution == "MacOSX" + when: ansible_facts['distribution'] == "MacOSX" - name: Ensure Oh My Zsh required homebrew packages are installed. community.general.homebrew: name: "{{ item.name | default(item) }}" install_options: "{{ item.install_options | default(omit) }}" loop: "{{ __oh_my_zsh_homebrew_required_packages }}" - when: ansible_distribution == "MacOSX" + when: ansible_facts['distribution'] == "MacOSX" diff --git a/roles/oh_my_zsh/tasks/main.yml b/roles/oh_my_zsh/tasks/main.yml index ea3e9e3e..618bae10 100644 --- a/roles/oh_my_zsh/tasks/main.yml +++ b/roles/oh_my_zsh/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Setup on macOS ansible.builtin.include_tasks: macos.yml - when: "ansible_os_family == 'Darwin'" + when: "ansible_facts['os_family'] == 'Darwin'" - name: Check if ~/.oh-my-zsh already exists ansible.builtin.stat: diff --git a/roles/pyenv/defaults/main.yml b/roles/pyenv/defaults/main.yml index 7a1947ff..8b064707 100644 --- a/roles/pyenv/defaults/main.yml +++ b/roles/pyenv/defaults/main.yml @@ -1,5 +1,5 @@ --- -pyenv_root: "{{ ansible_env.HOME }}/.pyenv" +pyenv_root: "{{ ansible_facts['env']['HOME'] }}/.pyenv" pyenv_python_versions: - 3.11.14 diff --git a/roles/pyenv/tasks/macos.yml b/roles/pyenv/tasks/macos.yml index ecdb373b..837e9abb 100644 --- a/roles/pyenv/tasks/macos.yml +++ b/roles/pyenv/tasks/macos.yml @@ -4,11 +4,11 @@ with_first_found: - files: - macos.yml - when: ansible_distribution == "MacOSX" + when: ansible_facts['distribution'] == "MacOSX" - name: Ensure pyenv required homebrew packages are installed. community.general.homebrew: name: "{{ item.name | default(item) }}" install_options: "{{ item.install_options | default(omit) }}" loop: "{{ __pyenv_homebrew_required_packages }}" - when: ansible_distribution == "MacOSX" + when: ansible_facts['distribution'] == "MacOSX" diff --git a/roles/pyenv/tasks/main.yml b/roles/pyenv/tasks/main.yml index 03545d4e..5a2337df 100644 --- a/roles/pyenv/tasks/main.yml +++ b/roles/pyenv/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Setup on macOS ansible.builtin.include_tasks: macos.yml - when: "ansible_os_family == 'Darwin'" + when: "ansible_facts['os_family'] == 'Darwin'" - name: Check if ~/.pyenv already exists ansible.builtin.stat: diff --git a/roles/pyenv/templates/.pyenvrc.j2 b/roles/pyenv/templates/.pyenvrc.j2 index 9aef93a0..1b662267 100644 --- a/roles/pyenv/templates/.pyenvrc.j2 +++ b/roles/pyenv/templates/.pyenvrc.j2 @@ -1,4 +1,4 @@ export PYENV_ROOT="{{ pyenv_root }}" export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init --path)" -eval "$(pyenv virtualenv-init -)" +eval "$(pyenv init --path $SHELL)" +eval "$(pyenv virtualenv-init - $SHELL)" diff --git a/roles/pyenv/vars/macos.yml b/roles/pyenv/vars/macos.yml index 0d5da429..c63446d2 100644 --- a/roles/pyenv/vars/macos.yml +++ b/roles/pyenv/vars/macos.yml @@ -8,4 +8,4 @@ __pyenv_homebrew_required_packages: - zlib - tcl-tk -__pyenv_rc_path: "{{ ansible_env.HOME }}/.zshrc" +__pyenv_rc_path: "{{ ansible_facts['env']['HOME'] }}/.zshrc"