diff --git a/.ansible-lint b/.ansible-lint index e6a02bd0f..de25ce32a 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,4 +1,13 @@ --- +exclude_paths: + - roles/elliotweiser.osx-command-line-tools + skip_list: + - schema[meta] + - role-name - experimental - - fqcn-builtins + - fqcn + - name[missing] + - no-changed-when + - risky-file-permissions + - yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..386190298 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + updates: + applies-to: version-updates + patterns: + - "*" + security-updates: + applies-to: security-updates + patterns: + - "*" diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index c7ff12754..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 30 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - pinned - - security - - planned - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -pulls: - markComment: |- - This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! - - Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale. - - unmarkComment: >- - This pull request is no longer marked for closure. - - closeComment: >- - This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. - -issues: - markComment: |- - This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! - - Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. - - unmarkComment: >- - This issue is no longer marked for closure. - - closeComment: >- - This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e893a3ed7..690a394c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,11 @@ name: CI 'on': pull_request: + paths-ignore: + - '*.md' # Markdown docs need no linting/testing etc. push: + paths-ignore: + - '*.md' branches: - master schedule: @@ -15,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the codebase. - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Set up Python 3. - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -36,12 +40,12 @@ jobs: strategy: matrix: os: - - macos-12 - - macos-11 + - macos-15 + - macos-14 steps: - name: Check out the codebase. - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Uninstall GitHub Actions' built-in Homebrew. run: tests/uninstall-homebrew.sh @@ -50,6 +54,7 @@ jobs: run: | sudo rm -rf /Applications/Firefox.app sudo rm -rf /Applications/Google\ Chrome.app + sudo rm -rf /usr/local/bin/firefox - name: Install test dependencies. run: | diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..26d74b865 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,34 @@ +--- +name: Close inactive issues +'on': + schedule: + - cron: "55 18 * * 4" # semi-random time + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v10 + with: + days-before-stale: 120 + days-before-close: 60 + exempt-issue-labels: bug,pinned,security,planned + exempt-pr-labels: bug,pinned,security,planned + stale-issue-label: "stale" + stale-pr-label: "stale" + stale-issue-message: | + This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! + + Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. + close-issue-message: | + This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. + stale-pr-message: | + This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! + + Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. + close-pr-message: | + This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index a97f7a52f..795c74ded 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.vagrant .DS_Store +.ansible *.retry roles* config.yml diff --git a/.yamllint b/.yamllint index 84ecaec77..71f676422 100644 --- a/.yamllint +++ b/.yamllint @@ -7,4 +7,4 @@ rules: level: warning ignore: | - .github/stale.yml + .github/workflows/stale.yml diff --git a/README.md b/README.md index a1ed69794..e848816e7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This playbook installs and configures most of the software I use on my Mac for w 1. Ensure Apple's command line tools are installed (`xcode-select --install` to launch the installer). 2. [Install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/index.html): - 1. Run the following command to add Python 3 to your $PATH: `export PATH="$HOME/Library/Python/3.8/bin:/opt/homebrew/bin:$PATH"` + 1. Run the following command to add Python 3 to your $PATH: `export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH"` 2. Upgrade Pip: `sudo pip3 install --upgrade pip` 3. Install Ansible: `pip3 install ansible` @@ -25,7 +25,7 @@ This playbook installs and configures most of the software I use on my Mac for w You can use this playbook to manage other Macs as well; the playbook doesn't even need to be run from a Mac at all! If you want to manage a remote Mac, either another Mac on your network, or a hosted Mac like the ones from [MacStadium](https://www.macstadium.com), you just need to make sure you can connect to it with SSH: - 1. (On the Mac you want to connect to:) Go to System Preferences > Sharing. + 1. (On the Mac you want to connect to:) Go to System Settings > Sharing. 2. Enable 'Remote Login'. > You can also enable remote login on the command line: @@ -54,7 +54,6 @@ You can override any of the defaults configured in `default.config.yml` by creat ```yaml homebrew_installed_packages: - - cowsay - git - go @@ -117,20 +116,18 @@ Packages (installed with Homebrew): - gettext - gifsicle - git - - github/gh/gh + - gh - go - gpg - httpie - iperf - libevent - sqlite - - mcrypt - nmap - node - nvm - php - ssh-copy-id - - cowsay - readline - openssl - pv @@ -165,5 +162,5 @@ Check out [Ansible for DevOps](https://www.ansiblefordevops.com/), which teaches This project was created by [Jeff Geerling](https://www.jeffgeerling.com/) (originally inspired by [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks)). -[badge-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/workflows/CI/badge.svg?event=push -[link-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/actions?query=workflow%3ACI +[badge-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/actions/workflows/ci.yml/badge.svg +[link-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/actions/workflows/ci.yml diff --git a/ansible.cfg b/ansible.cfg index 532d6335d..b043f1ea3 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,5 +2,5 @@ nocows = True roles_path = ./roles:/etc/ansible/roles inventory = inventory -become = true -stdout_callback = yaml +become = True +callback_result_format = yaml diff --git a/default.config.yml b/default.config.yml index 8ba392b34..35aca2970 100644 --- a/default.config.yml +++ b/default.config.yml @@ -1,6 +1,4 @@ --- -downloads: ~/.ansible-downloads/ - configure_dotfiles: true configure_terminal: true configure_osx: true @@ -18,7 +16,7 @@ dockitems_persist: [] # pos: 5 configure_sudoers: false -sudoers_custom_config: '' +sudoers_custom_config: "" # Example: # sudoers_custom_config: | # # Allow users in admin group to use sudo with no password. @@ -27,6 +25,7 @@ sudoers_custom_config: '' dotfiles_repo: https://github.com/geerlingguy/dotfiles.git dotfiles_repo_accept_hostkey: true dotfiles_repo_local_destination: ~/Development/GitHub/dotfiles +dotfiles_repo_version: master # Replace with your default branch dotfiles_files: - .zshrc - .gitignore @@ -42,20 +41,19 @@ homebrew_installed_packages: - gettext - gifsicle - git - - github/gh/gh + - gh - go - gpg - httpie - iperf - libevent - sqlite - - mcrypt - nmap - node - nvm - php + - pngpaste - ssh-copy-id - - cowsay - readline - openssl - pv @@ -63,9 +61,7 @@ homebrew_installed_packages: - wrk - zsh-history-substring-search -homebrew_taps: - - homebrew/core - - homebrew/cask +homebrew_taps: [] homebrew_cask_appdir: /Applications homebrew_cask_apps: @@ -81,7 +77,7 @@ homebrew_cask_apps: - sublime-text - transmit -# See `geerlingguy.mas` role documentation for usage instructions. +# See `geerlingguy.mac.mas` role documentation for usage instructions. mas_installed_apps: [] mas_email: "" mas_password: "" @@ -110,7 +106,7 @@ pip_packages: [] # Set to 'true' to configure Sublime Text. configure_sublime: false -sublime_base_path: '~/Library/Application Support/Sublime Text' +sublime_base_path: "~/Library/Application Support/Sublime Text" sublime_config_path: "Packages/User" sublime_package_control: - "DocBlockr" @@ -119,12 +115,12 @@ sublime_package_control: - "GitHub Flavored Markdown Preview" - "Jinja2" - "Package Control" - - "PHP-Twig" - "Pretty JSON" - "SublimeLinter" - "SublimeLinter-contrib-yamllint" + - "Theme - Cobalt2" - "TrailingSpaces" - - "WordCount" + - "WordingStatus" # Glob pattern to ansible task files to run after all other tasks are finished. post_provision_tasks: [] diff --git a/files/sublime/Cobalt (SL).tmTheme b/files/sublime/Cobalt (SL).tmTheme deleted file mode 100644 index a9f192432..000000000 --- a/files/sublime/Cobalt (SL).tmTheme +++ /dev/null @@ -1,589 +0,0 @@ - - - - - comment - Created by Jacob Rus. Based on ‘Slate’ by Wilson Miner - author - Jacob Rus - name - Cobalt - settings - - - settings - - background - #002240 - caret - #FFFFFF - foreground - #FFFFFF - invisibles - #FFFFFF26 - lineHighlight - #00000059 - selection - #B36539BF - - - - name - Punctuation - scope - punctuation - (punctuation.definition.string || punctuation.definition.comment) - settings - - fontStyle - - foreground - #E1EFFF - - - - name - Constant - scope - constant - settings - - fontStyle - - foreground - #FF628C - - - - name - Entity - scope - entity - settings - - fontStyle - - foreground - #FFDD00 - - - - name - Keyword - scope - keyword - settings - - fontStyle - - foreground - #FF9D00 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #FFEE80 - - - - name - String - scope - string -string.unquoted.old-plist -string.unquoted.heredoc, string.unquoted.heredoc string - settings - - fontStyle - - foreground - #3AD900 - - - - name - Comment - scope - comment - settings - - fontStyle - italic - foreground - #0088FF - - - - name - Support - scope - support - settings - - fontStyle - - foreground - #80FFBB - - - - name - Variable - scope - variable - settings - - fontStyle - - foreground - #CCCCCC - - - - name - Lang Variable - scope - variable.language - settings - - fontStyle - - foreground - #FF80E1 - - - - name - Function Call - scope - meta.function-call - settings - - foreground - #FFEE80 - - - - name - Invalid - scope - invalid - settings - - background - #800F00 - foreground - #F8F8F8 - - - - name - Embedded Source - scope - text source, string.unquoted.heredoc, source source - settings - - background - #223545 - fontStyle - - foreground - #FFFFFF - - - - name - Entity inherited-class - scope - entity.other.inherited-class - settings - - fontStyle - italic - foreground - #80FCFF - - - - name - String embedded-source - scope - string.quoted source - settings - - fontStyle - - foreground - #9EFF80 - - - - name - String constant - scope - string constant - settings - - foreground - #80FF82 - - - - name - String.regexp - scope - string.regexp - settings - - foreground - #80FFC2 - - - - name - String variable - scope - string variable - settings - - foreground - #EDEF7D - - - - name - Support.function - scope - support.function - settings - - fontStyle - - foreground - #FFB054 - - - - name - Support.constant - scope - support.constant - settings - - fontStyle - - foreground - #EB939A - - - - name - Exception - scope - support.type.exception - settings - - foreground - #FF1E00 - - - - name - C/C++ Preprocessor Line - scope - meta.preprocessor.c - settings - - foreground - #8996A8 - - - - name - C/C++ Preprocessor Directive - scope - meta.preprocessor.c keyword - settings - - foreground - #AFC4DB - - - - name - Doctype/XML Processing - scope - meta.sgml.html meta.doctype, meta.sgml.html meta.doctype entity, meta.sgml.html meta.doctype string, meta.xml-processing, meta.xml-processing entity, meta.xml-processing string - settings - - foreground - #73817D - - - - name - Meta.tag.A - scope - meta.tag, meta.tag entity - settings - - foreground - #9EFFFF - - - - name - css tag-name - scope - meta.selector.css entity.name.tag - settings - - foreground - #9EFFFF - - - - name - css#id - scope - meta.selector.css entity.other.attribute-name.id - settings - - foreground - #FFB454 - - - - name - css.class - scope - meta.selector.css entity.other.attribute-name.class - settings - - foreground - #5FE461 - - - - name - css property-name: - scope - support.type.property-name.css - settings - - foreground - #9DF39F - - - - name - css property-value; - scope - meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css - settings - - foreground - #F6F080 - - - - name - css @at-rule - scope - meta.preprocessor.at-rule keyword.control.at-rule - settings - - foreground - #F6AA11 - - - - name - css additional-constants - scope - meta.property-value support.constant.named-color.css, meta.property-value constant - settings - - foreground - #EDF080 - - - - name - css constructor.argument - scope - meta.constructor.argument.css - settings - - foreground - #EB939A - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - background - #000E1A - fontStyle - - foreground - #F8F8F8 - - - - name - diff.deleted - scope - markup.deleted - settings - - background - #4C0900 - foreground - #F8F8F8 - - - - name - diff.changed - scope - markup.changed - settings - - background - #806F00 - foreground - #F8F8F8 - - - - name - diff.inserted - scope - markup.inserted - settings - - background - #154F00 - foreground - #F8F8F8 - - - - name - Raw Markup - scope - markup.raw - settings - - background - #8FDDF630 - - - - name - Block Quote - scope - markup.quote - settings - - background - #004480 - - - - name - List - scope - markup.list - settings - - background - #130D26 - - - - name - Bold Markup - scope - markup.bold - settings - - fontStyle - bold - foreground - #C1AFFF - - - - name - Italic Markup - scope - markup.italic - settings - - fontStyle - italic - foreground - #B8FFD9 - - - - name - Heading Markup - scope - markup.heading - settings - - background - #001221 - fontStyle - bold - foreground - #C8E4FD - - - - name - SublimeLinter Error - scope - sublimelinter.mark.error - settings - - foreground - #DA2000 - - - name - SublimeLinter Warning - scope - sublimelinter.mark.warning - settings - - foreground - #EDBA00 - - - name - SublimeLinter Gutter Mark - scope - sublimelinter.gutter-mark - settings - - foreground - #FFFFFF - - - uuid - 06CD1FB2-A00A-4F8C-97B2-60E131980454 - - \ No newline at end of file diff --git a/files/sublime/Preferences.sublime-settings b/files/sublime/Preferences.sublime-settings index 46d6e2f96..c169b6114 100644 --- a/files/sublime/Preferences.sublime-settings +++ b/files/sublime/Preferences.sublime-settings @@ -302,7 +302,7 @@ "*.zip" ], "close_windows_when_empty": true, - "color_scheme": "Packages/User/Cobalt (SL).tmTheme", + "color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme", "create_window_at_startup": false, "detect_indentation": true, "draw_minimap_border": false, @@ -388,6 +388,13 @@ "varname", "vg" ], + "indent_guide_options": ["draw_normal", "draw_active"], + "hide_tab_scrolling_buttons": true, + "highlight_modified_tabs": true, + "line_padding_bottom": 1, + "line_padding_top": 1, + "caret_style": "blink", + "bold_folder_labels": false, "line_numbers": true, "margin": 4, "match_brackets": true, @@ -399,8 +406,9 @@ "smart_indent": true, "spell_check": false, "tab_size": 2, - "theme": "auto", + "theme": "Cobalt2.sublime-theme", "translate_tabs_to_spaces": true, "trim_automatic_white_space": false, "trim_trailing_white_space_on_save": false, + "index_files": true, } diff --git a/full-mac-setup.md b/full-mac-setup.md index 4e9f2d6e0..cfd9c419f 100644 --- a/full-mac-setup.md +++ b/full-mac-setup.md @@ -9,18 +9,18 @@ This document covers that, at least in terms of setting up a brand new Mac out o Before starting, I completed Apple's mandatory macOS setup wizard (creating a local user account, and optionally signing into my iCloud account). Once on the macOS desktop, I do the following (in order): - Install Ansible (following the guide in [README.md](README.md)) - - **Sign in in App Store** (since `mas` can't sign in automatically) + - **Sign in to App Store** (since `mas` can't sign in automatically) - Clone mac-dev-playbook to the Mac: `git clone git@github.com:geerlingguy/mac-dev-playbook.git` - Drop `config.yml` from `~/Dropbox/Apps/Config` to the playbook (copy over the network or using a USB flash drive). - - Run the playbook with `--skip-tags post`. + - Run the playbook. - If there are errors, you may need to finish up other tasks like installing 'old-fashioned' apps first (since I try to place Photoshop in the Dock and it can't be installed automatically). Then, run the playbook again ;) - Start Synchronization tasks: - Open Photos and make sure iCloud sync options are correct - Open Music, make sure computer is authorized, and set Library sync options - Open Dropbox, sign in, and set up sync - - Install old-fashioned apps: - - Install [Creative Cloud](https://creativecloud.adobe.com/apps/download/creative-cloud) - - Install Photoshop/Illustrator manually + - Install or complete setup for old-fashioned apps: + - Open Creative Cloud, sign in, and install needed apps + - Open iStat Menus and configure CPU/Net/Temp Combined view - (If required:) - Install [Elgato Stream Deck](https://www.elgato.com/en/downloads) - Open Livestream profile inside `~/Dropbox/Apps/Config/Stream Deck` @@ -28,31 +28,37 @@ Before starting, I completed Apple's mandatory macOS setup wizard (creating a lo - Install [Autodesk Fusion 360](https://www.autodesk.com) - Install Microsoft Office Home & Student 2019 (https://account.microsoft.com/services/) - Install [Fritzing](https://fritzing.org/download/) - - Install Meshmixer (but it looks like it's gone now!) - Configure FastMail account: - Log into Fastmail - - Go to settings, go to the setup page for macOS Mail - - Download the profile and double click to install - - Head to the 'Profiles' System Preference pane and click install - - Open Calendar and enable personal Google CalDAV account (you have to manually sign in). + - Go to settings, then Privacy & Security + - Create a new app password, and on that page, download the configuration file + - Open the downloaded profile, then go to System Preferences, and Device Management + - Double-click on the Fastmail profile + - Click 'Install...' and install it + - Configure which accounts are enabled in the 'Internet Accounts' System Preferences pane + - Open Calendar and enable personal Google CalDAV account (you have to manually sign in). - Manually copy `~/Development` folder from another Mac (to save time). - Manual settings to automate someday: + - Finder: + - Disable click-to-show Desktop: `defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false` - System Preferences: - Accessibility > Display > Reduce transparency - - Keyboard > Modifier Keys... > Caps Lock to Esc + - Keyboard > Keyboard Shortcuts... > Modifier Keys... > Caps Lock to Esc + - Keyboard > Key repeat rate to 'Fast', Delay until repeat to 'Short' + - Privacy & Security > Full Disk Access > enable "Terminal" - Safari: - View > Show Status Bar - Preferences > Advanced > "Show full website address" - - Preferences > Advanced > "Show Develop menu in menu bar" + - Preferences > Advanced > "Show features for web developers" + - Install the 'Return YouTube Dislike' Userscript in Userscripts - Dock: - - Add jgeerling, Downloads, Applications, and Video Projects folders - - Terminal: - - Preferences > Profiles > Set JJG-Term as the default theme - - _After Dropbox Sync completes_: Run the playbook with `--tags post` to complete setup. - - Symlink the synchronized `config.yml` into the playbook dir: `ln -s /Users/jgeerling/Dropbox/Apps/Config/mac-dev-playbook/config.yml /Users/jgeerling/Development/mac-dev-playbook/config.yml` + - Add jgeerling, Downloads, Applications, and shared "mercury" folders + - Final Cut Pro + - Install FxFactory and sign in: https://fxfactory.com + - Copy contents of `~/Development/youtube/fcpx` into respective directories - These things might be automatable, but I do them manually right now: - - Configure Time Machine backup drive and [Time Machine Editor](https://tclementdev.com/timemachineeditor/) (if needed) - - Install Wireguard from App Store and add configuration (if needed) + - Configure Time Machine backup drive + - Install Wireguard VPN configurations (if needed) ## To Wrap in Post-provision automation @@ -62,7 +68,7 @@ The following tasks have to wait for the initial Dropbox sync to complete before # ZSH Aliases. ln -s /Users/jgeerling/Dropbox/Apps/Config/.aliases /Users/jgeerling/.aliases -# Electrum BTC Wallet. +# Electrum BTC Wallet (open Electrum first). ln -s /Users/jgeerling/Dropbox/Apps/Electrum/default_wallet /Users/jgeerling/.electrum/wallets/default_wallet # SSH setup. @@ -78,7 +84,7 @@ sudo ln -s /Users/jgeerling/Dropbox/VMs/roles /etc/ansible/roles mkdir -p /Users/jgeerling/.ansible ln -s /Users/jgeerling/Dropbox/Apps/Config/ansible/galaxy_token /Users/jgeerling/.ansible/galaxy_token ln -s /Users/jgeerling/Dropbox/Apps/Config/ansible/mm-vault-password.txt /Users/jgeerling/.ansible/mm-vault-password.txt -ln -s /Users/jgeerling/Dropbox/VMs/ /Users/jgeerling/.ansible/collections +ln -s /Users/jgeerling/Dropbox/VMs/ansible_collections /Users/jgeerling/.ansible/collections # Final Cut Pro setup. (Open Motion first) cp -r /Users/jgeerling/Dropbox/Apps/Config/Motion/Motion\ Templates.localized/ /Users/jgeerling/Movies/Motion\ Templates.localized/ @@ -96,7 +102,7 @@ mkdir -p ~/.vim/bundle cd ~/.vim/autoload curl https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim > pathogen.vim cd ~/.vim/bundle -git clone git://github.com/scrooloose/nerdtree.git +git clone https://github.com/preservim/nerdtree.git ``` ## When formatting old Mac @@ -109,4 +115,4 @@ git clone git://github.com/scrooloose/nerdtree.git - Motion Plugins from ~/Movies/Motion - Final Cut Pro Text Styles in ~/Library/Application Support/Motion/Library/Text Styles - Sequel Ace shortcuts from ~/Library/Containers/com.sequel-ace.sequel-ace/Data/Library/Application\ Support/Sequel\ Ace/Data/Favorites.plist - - Follow Apple's guide (TODO) + - Follow Apple's guide [here](https://support.apple.com/en-au/HT212749) diff --git a/main.yml b/main.yml index ac7a6f8bd..9c7861edb 100644 --- a/main.yml +++ b/main.yml @@ -1,5 +1,6 @@ --- -- hosts: all +- name: Configure host. + hosts: all vars_files: - default.config.yml @@ -19,7 +20,7 @@ when: configure_dotfiles tags: ['dotfiles'] - role: geerlingguy.mac.mas - when: mas_installed_apps or mas_installed_app_ids + when: (mas_installed_apps | length > 0) or (mas_installed_app_ids | length > 0) tags: ['mas'] - role: geerlingguy.mac.dock when: configure_dock @@ -45,10 +46,11 @@ when: configure_sublime tags: ['sublime-text'] - - block: + - name: Run post-provision task files in a block. + tags: ['post'] + block: - name: Run configured post-provision ansible task files. include_tasks: "{{ outer_item }}" loop_control: loop_var: outer_item - with_fileglob: "{{ post_provision_tasks|default(omit) }}" - tags: ['post'] + with_fileglob: "{{ post_provision_tasks | default(omit) }}" diff --git a/tasks/sublime-text.yml b/tasks/sublime-text.yml index 349df9ecd..d07f7698a 100644 --- a/tasks/sublime-text.yml +++ b/tasks/sublime-text.yml @@ -22,7 +22,6 @@ src: "files/sublime/{{ item }}" dest: "{{ sublime_base_path }}/{{ sublime_config_path }}/{{ item }}" loop: - - "Cobalt (SL).tmTheme" - "Markdown.sublime-settings" - "Plain text.sublime-settings" - "Preferences.sublime-settings" diff --git a/tasks/terminal.yml b/tasks/terminal.yml index f4a26789a..b1a6d6e8c 100644 --- a/tasks/terminal.yml +++ b/tasks/terminal.yml @@ -4,6 +4,7 @@ command: defaults read com.apple.terminal 'Default Window Settings' register: terminal_theme changed_when: false + failed_when: false check_mode: false - name: Ensure custom Terminal profile is added. diff --git a/tests/config.yml b/tests/config.yml index e95fb9294..9631a151e 100644 --- a/tests/config.yml +++ b/tests/config.yml @@ -5,7 +5,6 @@ homebrew_installed_packages: - gettext - sqlite - ssh-copy-id - - cowsay - readline - pv - wget diff --git a/tests/uninstall-homebrew.sh b/tests/uninstall-homebrew.sh index d6d4c966c..40e1bf183 100755 --- a/tests/uninstall-homebrew.sh +++ b/tests/uninstall-homebrew.sh @@ -11,3 +11,4 @@ sudo ./uninstall.sh --force sudo rm -rf /usr/local/Homebrew sudo rm -rf /usr/local/Caskroom sudo rm -rf /usr/local/bin/brew +sudo rm -rf /opt/homebrew