diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..252a91d52 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @scoremedia/release-engineering diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 96b493831..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -# These are supported funding model platforms ---- -github: geerlingguy -patreon: geerlingguy diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d8abd2893..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -name: CI -'on': - pull_request: - push: - branches: - - master - schedule: - - cron: "0 5 * * 4" - -jobs: - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Check out the codebase. - uses: actions/checkout@v2 - - - name: Set up Python 3. - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install test dependencies. - run: pip3 install yamllint ansible ansible-lint - - - name: Lint code. - run: | - yamllint . - ansible-lint - - integration: - name: Integration - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - macos-12 - - macos-11 - - steps: - - name: Check out the codebase. - uses: actions/checkout@v2 - - - name: Uninstall GitHub Actions' built-in Homebrew. - run: tests/uninstall-homebrew.sh - - - name: Uninstall GitHub Actions' built-in browser installs. - 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: | - sudo pip3 install --upgrade pip - sudo pip3 install ansible - - - name: Set up the test environment. - run: | - cp tests/ansible.cfg ./ansible.cfg - cp tests/inventory ./inventory - cp tests/config.yml ./config.yml - ansible-galaxy install -r requirements.yml - - - name: Test the playbook's syntax. - run: ansible-playbook main.yml --syntax-check - - - name: Test the playbook. - run: ansible-playbook main.yml - env: - ANSIBLE_FORCE_COLOR: '1' - - - name: Idempotence check. - run: | - idempotence=$(mktemp) - ansible-playbook main.yml | tee -a ${idempotence} - tail ${idempotence} | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - env: - ANSIBLE_FORCE_COLOR: '1' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 5a6647f2b..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -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@v8 - 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/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..060fcb8a3 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "redhat.ansible", + "esbenp.prettier-vscode", + "tyriar.sort-lines" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..1258ddb07 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + } + }, + "[markdown]": { + "editor.rulers": [400], + "editor.wordWrap": "off" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "isort.args": ["--profile", "black"], + "editor.formatOnSave": true, + "files.insertFinalNewline": true, + "ansible.python.interpreterPath": "/usr/bin/python3" + } diff --git a/LICENSE b/LICENSE index 4e429ee85..82dd14049 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +After [c99ff5](https://github.com/scoremedia/dev-laptop-setup/commit/c99ff5da76d7a077494ecb86a58bd5db44df6e70) the repository was forked and all development work done after is subject to theScore's licensing terms. All rights reserved. + Copyright (c) 2013 Michael Griffin http://mwgriffin.com @@ -5,4 +7,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 7e70bb051..394978885 100644 --- a/README.md +++ b/README.md @@ -1,160 +1,58 @@ -Mac Dev Playbook Logo +Mac Dev Playbook Logo # Mac Development Ansible Playbook -[![CI][badge-gh-actions]][link-gh-actions] +This playbook installs and configures laptop for development work in SRE Release Engineering. -This playbook installs and configures most of the software I use on my Mac for web and software development. Some things in macOS are slightly difficult to automate, so I still have a few manual installation steps, but at least it's all documented here. +## First Time Steps -## Installation +These steps should only be executed once as subsequently you will have Ansible installed via homebrew. - 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. 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.9/bin:/opt/homebrew/bin:$PATH"` - 2. Upgrade Pip: `sudo pip3 install --upgrade pip` - 3. Install Ansible: `pip3 install ansible` + 1. Run the following command to add Python 3 to your $PATH temporarily: `export PATH="$HOME/Library/Python/3.9/bin:$PATH"` + 2. Upgrade Pip: `sudo pip3 install --upgrade pip` + 3. Install Ansible: `pip3 install ansible` - 3. Clone or download this repository to your local drive. - 4. Run `ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles. - 5. Run `ansible-playbook main.yml --ask-become-pass` inside this directory. Enter your macOS account password when prompted for the 'BECOME' password. +### Running the Playbooks -> Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case. +#### Setup + +1. Clone or download this repository to your local drive. +1. Run `ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles. -### Use with a remote Mac +#### SRE Release Engineering -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: +This playbook will setup the laptop for SRE Release Engineering. - 1. (On the Mac you want to connect to:) Go to System Preferences > Sharing. - 2. Enable 'Remote Login'. +To run this: `ansible-playbook playbooks/srere-laptop-setup.yml --ask-become-pass` -> You can also enable remote login on the command line: -> -> sudo systemsetup -setremotelogin on +It performs the following tasks: -Then edit the `inventory` file in this repository and change the line that starts with `127.0.0.1` to: +- Installs homebrew and sets up the Jfrog repository +- Install homebrew packages, apps and taps as defined in `homebrew_installed_packages`, `homebrew_cask_apps`, `homebrew_taps` in [default.srere-laptop-setup.yml](vars_files/default.srere-laptop-setup.yml) +- Sets up the zsh shell by setting up common functions, paths variable and other environment variables. +- Sets up Git with some configurations like: + - GPG Signing + - Proper username and email (derived from your Mac username) + - Default init branch set to main + - `push.autoSetupRemote` set so you don't have to do `git push --set-upstream` when pushing a new branch +- Helm repository setup to point to the internal Helm Chart repository. -``` -[ip address or hostname of mac] ansible_user=[mac ssh username] -``` +For a more accurate description please see [playbooks/srere-laptop-setup.yml](playbooks/srere-laptop-setup.yml) and the roles and tasks in it. -If you need to supply an SSH password (if you don't use SSH keys), make sure to pass the `--ask-pass` parameter to the `ansible-playbook` command. +> Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case. ### Running a specific set of tagged tasks -You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas`, `extra-packages` and `osx`. +You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags that are available can be listed by running `ansible-playbook playbooks/srere-laptop-setup.yml --list-tags`. - ansible-playbook main.yml -K --tags "dotfiles,homebrew" + ansible-playbook playbooks/srere-laptop-setup.yml --ask-become-pass --tags git-config,helm-repo-setup ## Overriding Defaults -Not everyone's development environment and preferred software configuration is the same. - -You can override any of the defaults configured in `default.config.yml` by creating a `config.yml` file and setting the overrides in that file. For example, you can customize the installed packages and apps with something like: - -```yaml -homebrew_installed_packages: - - cowsay - - git - - go - -mas_installed_apps: - - { id: 443987910, name: "1Password" } - - { id: 498486288, name: "Quick Resizer" } - - { id: 557168941, name: "Tweetbot" } - - { id: 497799835, name: "Xcode" } - -composer_packages: - - name: hirak/prestissimo - - name: drush/drush - version: '^8.1' - -gem_packages: - - name: bundler - state: latest - -npm_packages: - - name: webpack - -pip_packages: - - name: mkdocs - -configure_dock: true -dockitems_remove: - - Launchpad - - TV -dockitems_persist: - - name: "Sublime Text" - path: "/Applications/Sublime Text.app/" - pos: 5 -``` - -Any variable can be overridden in `config.yml`; see the supporting roles' documentation for a complete list of available variables. - -## Included Applications / Configuration (Default) - -Applications (installed with Homebrew Cask): - - - [ChromeDriver](https://sites.google.com/chromium.org/driver/) - - [Docker](https://www.docker.com/) - - [Dropbox](https://www.dropbox.com/) - - [Firefox](https://www.mozilla.org/en-US/firefox/new/) - - [Google Chrome](https://www.google.com/chrome/) - - [Handbrake](https://handbrake.fr/) - - [Homebrew](http://brew.sh/) - - [LICEcap](http://www.cockos.com/licecap/) - - [nvALT](http://brettterpstra.com/projects/nvalt/) - - [Sequel Ace](https://sequel-ace.com) (MySQL client) - - [Slack](https://slack.com/) - - [Sublime Text](https://www.sublimetext.com/) - - [Transmit](https://panic.com/transmit/) (S/FTP client) - -Packages (installed with Homebrew): - - - autoconf - - bash-completion - - doxygen - - gettext - - gifsicle - - git - - gh - - go - - gpg - - httpie - - iperf - - libevent - - sqlite - - nmap - - node - - nvm - - php - - ssh-copy-id - - cowsay - - readline - - openssl - - pv - - wget - - wrk - - zsh-history-substring-search - -My [dotfiles](https://github.com/geerlingguy/dotfiles) are also installed into the current user's home directory, including the `.osx` dotfile for configuring many aspects of macOS for better performance and ease of use. You can disable dotfiles management by setting `configure_dotfiles: no` in your configuration. - -Finally, there are a few other preferences and settings added on for various apps and services. - -## Full / From-scratch setup guide - -Since I've used this playbook to set up something like 20 different Macs, I decided to write up a full 100% from-scratch install for my own reference (everyone's particular install will be slightly different). - -You can see my full from-scratch setup document here: [full-mac-setup.md](full-mac-setup.md). - -## Testing the Playbook - -Many people have asked me if I often wipe my entire workstation and start from scratch just to test changes to the playbook. Nope! This project is [continuously tested on GitHub Actions' macOS infrastructure](https://github.com/geerlingguy/mac-dev-playbook/actions?query=workflow%3ACI). - -You can also run macOS itself inside a VM, for at least some of the required testing (App Store apps and some proprietary software might not install properly). I currently recommend: - - - [UTM](https://mac.getutm.app) - - [Tart](https://github.com/cirruslabs/tart) +At this time this is not possible. The configuration is somewhat neccesary to do development work. When preferential configuration is added, overriding those options will be provided. ## Ansible for DevOps @@ -162,7 +60,4 @@ Check out [Ansible for DevOps](https://www.ansiblefordevops.com/), which teaches ## Author -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 +This project was created by [Komail Kanjee](https://github.com/komailo) and was forked off [mac-dev-playbook](https://github.com/geerlingguy/mac-dev-playbook) by [Jeff Geerling](https://www.jeffgeerling.com/) which was originally inspired by [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks). diff --git a/default.config.yml b/default.config.yml deleted file mode 100644 index cfd9cf8fb..000000000 --- a/default.config.yml +++ /dev/null @@ -1,127 +0,0 @@ ---- -downloads: ~/.ansible-downloads/ - -configure_dotfiles: true -configure_terminal: true -configure_osx: true - -# Set to 'true' to configure the Dock via dockutil. -configure_dock: false -dockitems_remove: [] -# - Launchpad -# - TV -# - Podcasts -# - 'App Store' -dockitems_persist: [] -# - name: "Sublime Text" -# path: "/Applications/Sublime Text.app/" -# pos: 5 - -configure_sudoers: false -sudoers_custom_config: '' -# Example: -# sudoers_custom_config: | -# # Allow users in admin group to use sudo with no password. -# %admin ALL=(ALL) NOPASSWD: ALL - -dotfiles_repo: https://github.com/geerlingguy/dotfiles.git -dotfiles_repo_accept_hostkey: true -dotfiles_repo_local_destination: ~/Development/GitHub/dotfiles -dotfiles_files: - - .zshrc - - .gitignore - - .inputrc - - .osx - - .vimrc - -homebrew_installed_packages: - # - ansible # Installed via Pip. - - autoconf - - bash-completion - - doxygen - - gettext - - gifsicle - - git - - gh - - go - - gpg - - httpie - - iperf - - libevent - - sqlite - - nmap - - node - - nvm - - php - - ssh-copy-id - - cowsay - - readline - - openssl - - pv - - wget - - wrk - - zsh-history-substring-search - -homebrew_taps: [] - -homebrew_cask_appdir: /Applications -homebrew_cask_apps: - - chromedriver - - docker - - dropbox - - firefox - - google-chrome - - handbrake - - licecap - - sequel-ace - - slack - - sublime-text - - transmit - -# See `geerlingguy.mas` role documentation for usage instructions. -mas_installed_apps: [] -mas_email: "" -mas_password: "" - -osx_script: "~/.osx --no-restart" - -# Install packages from other package managers. -# Note: You are responsible for making sure the required package managers are -# installed, eg. through homebrew. -composer_packages: [] -# - name: drush -# state: present # present/absent, default: present -# version: "^8.1" # default: N/A -gem_packages: [] -# - name: bundler -# state: present # present/absent/latest, default: present -# version: "~> 1.15.1" # default: N/A -npm_packages: [] -# - name: webpack -# state: present # present/absent/latest, default: present -# version: "^2.6" # default: N/A -pip_packages: [] -# - name: mkdocs -# state: present # present/absent/latest, default: present -# version: "0.16.3" # default: N/A - -# Set to 'true' to configure Sublime Text. -configure_sublime: false -sublime_base_path: '~/Library/Application Support/Sublime Text' -sublime_config_path: "Packages/User" -sublime_package_control: - - "DocBlockr" - - "Dockerfile Syntax Highlighting" - - "FileDiffs" - - "GitHub Flavored Markdown Preview" - - "Jinja2" - - "Package Control" - - "PHP-Twig" - - "Pretty JSON" - - "SublimeLinter" - - "SublimeLinter-contrib-yamllint" - - "TrailingSpaces" - - "WordCount" - -# 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/Markdown.sublime-settings b/files/sublime/Markdown.sublime-settings deleted file mode 100644 index c6c9b9459..000000000 --- a/files/sublime/Markdown.sublime-settings +++ /dev/null @@ -1,7 +0,0 @@ -{ - "auto_complete": false, - "extensions": - [ - "txt" - ] -} diff --git a/files/sublime/Plain text.sublime-settings b/files/sublime/Plain text.sublime-settings deleted file mode 100644 index c9fb4e6e2..000000000 --- a/files/sublime/Plain text.sublime-settings +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extensions": - [ - ] -} diff --git a/files/sublime/Preferences.sublime-settings b/files/sublime/Preferences.sublime-settings deleted file mode 100644 index 46d6e2f96..000000000 --- a/files/sublime/Preferences.sublime-settings +++ /dev/null @@ -1,406 +0,0 @@ -{ - "added_words": - [ - "Kubernetes", - "Ansible", - "Mesos", - "de", - "K8s", - "stateful", - "filesystem", - "cron", - "kubeadm", - "kops", - "Terraform", - "geerlingguy", - "kubernetes", - "playbooks", - "Vagrantfile", - "lang", - "config", - "debian9", - "vm", - "virtualbox", - "cpus", - "ip", - "hostname", - "k8s", - "ansible", - "playbook", - "yml", - "terabyte", - "plugin", - "kube", - "pre", - "kubelet", - "playbook's", - "dev", - "debian", - "ce", - "amd64", - "src", - "cidr", - "kubectl", - "sudo", - "su", - "v1", - "etcd", - "Ansible's", - "openshift", - "nginx", - "metadata", - "apps", - "app", - "namespace", - "a4d", - "yaml", - "linenos", - "3m", - "inline", - "http", - "api", - "ok", - "init", - "rbac", - "gz", - "linux", - "v2", - "https", - "unarchive", - "usr", - "dest", - "tmp", - "cp", - "stdout", - "admin", - "io", - "dns", - "phpmyadmin", - "wordpress", - "jenkins", - "drupal", - "Ceph", - "Gluster", - "Dramble", - "Plugins", - "Jinja", - "templating", - "Dockerfiles", - "Dockerfile", - "Geerling", - "busybox", - "rmi", - "ps", - "localhost", - "python2", - "ubuntu1604", - "angstwad", - "Ubuntu", - "Angstwad's", - "www", - "mysql", - "env", - "py", - "mkdir", - "Werkzeug", - "sqlalchemy", - "html", - "Jinja2", - "libmysqlclient", - "j2", - "ubuntu16", - "awk", - "sbin", - "everything's", - "cd", - "plugins", - "winrm", - "saltstack", - "Hubot", - "hubot", - "args", - "js", - "npm", - "chdir", - "lineinfile", - "json", - "regexp", - "redis", - "heroku", - "a4dbot", - "Slack's", - "bot's", - "lifecycle", - "microservices", - "wildcard", - "Encrypt's", - "crypto", - "ssl", - "privkey", - "pem", - "csr", - "fullchain", - "selfsigned", - "pyopenssl", - "libssl", - "distros", - "iptables", - "cfg", - "tcp", - "python3", - "distro", - "vhosts", - "docroot", - "dir", - "refactor", - "idempotently", - "conf", - "Keychain", - "webservers", - "xyz", - "dbservers", - "httpd", - "rgb", - "dict", - "jinja", - "blog", - "Mazer's", - "Cisco", - "mv", - "endif", - "plugin's", - "versioning", - "namespaced", - "md", - "ruleset", - "ntp", - "parseable", - "foo", - "apache2", - "Diff", - "diffing", - "drush", - "php", - "url", - "multiline", - "nocows", - "java", - "workflows", - "devops", - "username", - "online", - "github", - "awx", - "cowsay", - "workflow", - "Rackspace", - "Uninstalling", - "uninstall", - "walkthrough", - "webhooks", - "Grafana", - "Rundeck", - "Drupal's", - "Symfony", - "Laravel", - "Joomla", - "idempotence", - "Drush's", - "Solr", - "solr", - "sha512", - "Solr's", - "openjdk", - "jdk", - "Ubuntu's", - "org", - "lucene", - "tgz", - "wget", - "txt", - "Andretti", - "devel", - "chkconfig", - "dicts", - "atl", - "subdomains", - "janedoe", - "vvvv", - "Vagrantfiles", - "admins", - "Remi", - "repo", - "epel", - "remi", - "rpms", - "remirepo", - "pki", - "gpg", - "enablerepo", - "nogpgcheck", - "firewalld", - "Remi's", - "disablerepo", - "req", - "scp", - "rsync", - "stderr", - "Forever's", - "nohup", - "app's", - "nodejs", - "pycurl", - "acl", - "ondrej", - "ppa", - "sendmail", - "php7", - "cli", - "gd", - "opcache", - "xml", - "mbstring", - "pdo", - "apcu", - "libpcre3", - "libapache2", - "mysqldb", - "ufw", - "a2enmod", - "virtualhost", - "a2ensite", - "a2dissite", - "symlinking", - "webmaster", - "ini", - "codebase", - "priv", - "cnf", - "phar" - ], - "auto_complete_commit_on_tab": true, - "auto_complete_delay": 200, - "auto_indent": true, - "auto_match_enabled": true, - "binary_file_patterns": - [ - "generated/*", - "*.tbz2", - "*.gzip", - "*.jpg", - "*.jpeg", - "*.png", - "*.gif", - "*.ttf", - "*.tga", - "*.dds", - "*.ico", - "*.eot", - "*.pdf", - "*.swf", - "*.jar", - "*.zip" - ], - "close_windows_when_empty": true, - "color_scheme": "Packages/User/Cobalt (SL).tmTheme", - "create_window_at_startup": false, - "detect_indentation": true, - "draw_minimap_border": false, - "draw_white_space": "selection", - "ensure_newline_at_eof_on_save": false, - "fade_fold_buttons": true, - "file_exclude_patterns": - [ - "*.pyc", - "*.pyo", - "*.exe", - "*.dll", - "*.obj", - "*.o", - "*.a", - "*.lib", - "*.so", - "*.dylib", - "*.ncb", - "*.sdf", - "*.suo", - "*.pdb", - "*.idb", - ".DS_Store", - "*.class", - "*.psd", - "*.db", - "*.sublime-workspace" - ], - "fold_buttons": true, - "folder_exclude_patterns": - [ - "node_modules", - ".svn", - ".git", - ".hg", - "CVS", - "vendor", - ".bundle", - ".vagrant" - ], - "font_size": 15.0, - "gpu_window_buffer": false, - "gutter": true, - "highlight_line": true, - "ignored_packages": - [ - "Vintage", - ], - "ignored_words": - [ - "0000ff", - "00f", - "12m", - "13m", - "5d", - "5m", - "6d", - "Phergie", - "Sutcliffe's", - "Uvh", - "ansicolor", - "awxcompose", - "configfile", - "examplenodeapp", - "getcomposer", - "googleapis", - "johndoe", - "johndoe1234", - "modifyvm", - "modulename", - "msg", - "node1", - "node2", - "oo", - "phergie", - "rf", - "rolename", - "si", - "v1beta1", - "var1", - "var2", - "varname", - "vg" - ], - "line_numbers": true, - "margin": 4, - "match_brackets": true, - "match_selection": true, - "rulers": - [ - 80 - ], - "smart_indent": true, - "spell_check": false, - "tab_size": 2, - "theme": "auto", - "translate_tabs_to_spaces": true, - "trim_automatic_white_space": false, - "trim_trailing_white_space_on_save": false, -} diff --git a/files/sublime/WordCount.sublime-settings b/files/sublime/WordCount.sublime-settings deleted file mode 100644 index 921d2b845..000000000 --- a/files/sublime/WordCount.sublime-settings +++ /dev/null @@ -1,3 +0,0 @@ -{ - "whitelist_syntaxes": ["Plain text", "Markdown"] -} diff --git a/files/terminal/JJG-Term.terminal b/files/terminal/JJG-Term.terminal deleted file mode 100644 index d10f0ccd0..000000000 --- a/files/terminal/JJG-Term.terminal +++ /dev/null @@ -1,242 +0,0 @@ - - - - - ANSIBlackColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGmCwwXHR4lVSRudWxs1Q0ODxAR - EhMUFRZcTlNDb21wb25lbnRzVU5TUkdCXE5TQ29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29s - b3JTcGFjZVYkY2xhc3NPECgwLjM4NDE0MzI4NDQgMC4zOTIzMTY1NDU4IDAuMzkyMzE2 - NTQ1OCAxTxAmMC4zMTA5OTExNjggMC4zMTg2NzQ4NjI0IDAuMzE4NT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ef+WAR4CogQqBa4HNgjCCkoL0g1eD - uoQdhICE44VHhauGDoZyhteHO4efiASIaYjOiTOJmYn+imSKyoswi5aL/IxjjMqNMY2Y - jf+OZo7OjzaPnpAGkG6Q1pE/kaiSEZJ6kuOTTZO2lCCUipT0lV+VyZY0lp+XCpd1l+CY - TJi4mSSZkJn8mmia1ZtCm6+cHJyJnPedZJ3SnkCerp8dn4uf+qBpoNihR6G2oiailqMG - o3aj5qRWpMelOKWpphqmi6b9p26n4KhSqMSpN6mpqhyqj6sCq3Wr6axcrNCtRK24ri2u - oa8Wr4uwALB1sOqxYLHWskuywrM4s660JbSctRO1irYBtnm28Ldot+C4WbjRuUq5wro7 - urW7LrunvCG8m70VvY++Cr6Evv+/er/1wHDA7MFnwePCX8Lbw1jD1MRRxM7FS8XIxkbG - w8dBx7/IPci8yTrJuco4yrfLNsu2zDXMtc01zbXONs62zzfPuNA50LrRPNG+0j/SwdNE - 08bUSdTL1U7V0dZV1tjXXNfg2GTY6Nls2fHadtr724DcBdyK3RDdlt4c3qLfKd+v4Dbg - veFE4cziU+Lb42Pj6+Rz5PzlhOYN5pbnH+ep6DLovOlG6dDqW+rl63Dr++yG7RHtnO4o - 7rTvQO/M8Fjw5fFy8f/yjPMZ86f0NPTC9VD13vZt9vv3ivgZ+Kj5OPnH+lf65/t3/Af8 - mP0p/br+S/7c/23//9IfICEiWiRjbGFzc25hbWVYJGNsYXNzZXNcTlNDb2xvclNwYWNl - oiMkXE5TQ29sb3JTcGFjZVhOU09iamVjdNIfICYnV05TQ29sb3KiJiQACAARABoAJAAp - ADIANwBJAEwAUQBTAFoAYABrAHgAfgCLAKAApwDSAPwA/gEAAQIBCQEOARQBFgEYARoN - Zg1rDXYNfw2MDY8NnA2lDaoNsgAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAA21 - - BackgroundAlphaInactive - 0.73865855823863635 - BackgroundBlur - 0.0 - BackgroundBlurInactive - 0.50397283380681823 - BackgroundColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO - U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzTxAqMC4wNzg3MTk0MjkzNSAwLjA3ODcxOTQy - OTM1IDAuMDc4NzE5NDI5MzUAEAGAAtIUFRYXWiRjbGFzc25hbWVYJGNsYXNzZXNXTlND - b2xvcqIWGFhOU09iamVjdAgRGiQpMjdJTFFTV11kand+q62vtL/I0NMAAAAAAAABAQAA - AAAAAAAZAAAAAAAAAAAAAAAAAAAA3A== - - BackgroundSettingsForInactiveWindows - - CursorColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO - U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC4zMDI0MTkzNgAQA4AC0hQVFhdaJGNs - YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs - eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9 - - Font - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGkCwwVFlUkbnVsbNQNDg8QERIT - FFZOU1NpemVYTlNmRmxhZ3NWTlNOYW1lViRjbGFzcyNALAAAAAAAABAQgAKAA11TRk1v - bm8tTWVkaXVt0hcYGRpaJGNsYXNzbmFtZVgkY2xhc3Nlc1ZOU0ZvbnSiGRtYTlNPYmpl - Y3QIERokKTI3SUxRU1heZ253foWOkJKUoqeyu8LFAAAAAAAAAQEAAAAAAAAAHAAAAAAA - AAAAAAAAAAAAAM4= - - FontAntialias - - FontWidthSpacing - 0.99596774193548387 - Linewrap - - ProfileCurrentVersion - 2.0699999999999998 - RestoreLines - 2000 - ScrollbackLines - 50000 - SelectionColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO - U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC4yNTQwMzIyNQAQA4AC0hQVFhdaJGNs - YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs - eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9 - - ShouldLimitScrollback - 1 - ShowWindowSettingsNameInTitle - - TerminalType - xterm-color - TextBoldColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO - U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NCMQAQA4AC0hQVFhdaJGNsYXNzbmFtZVgk - Y2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRseYCDhYeMl6Co - qwAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC0 - - TextColor - - YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS - AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO - U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC45NDc1ODA2NAAQA4AC0hQVFhdaJGNs - YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs - eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9 - - UseBrightBold - - columnCount - 120 - name - JJG-Term - rowCount - 30 - shellExitAction - 1 - type - Window Settings - - diff --git a/full-mac-setup.md b/full-mac-setup.md deleted file mode 100644 index 7408da911..000000000 --- a/full-mac-setup.md +++ /dev/null @@ -1,112 +0,0 @@ -# Full Mac Setup Process (for Jeff Geerling) - -There are some things in life that just can't be automated... or aren't 100% worth the time :( - -This document covers that, at least in terms of setting up a brand new Mac out of the box. - -## Initial configuration of a brand new Mac - -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) - - 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`. - - 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 - - (If required:) - - Install [Elgato Stream Deck](https://www.elgato.com/en/downloads) - - Open Livestream profile inside `~/Dropbox/Apps/Config/Stream Deck` - - Install [Elgato Key Light Air (Control Center)](https://www.elgato.com/en/downloads) - - 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). - - Manually copy `~/Development` folder from another Mac (to save time). - - Manual settings to automate someday: - - System Preferences: - - Accessibility > Display > Reduce transparency - - Keyboard > Modifier Keys... > Caps Lock to Esc - - Safari: - - View > Show Status Bar - - Preferences > Advanced > "Show full website address" - - Preferences > Advanced > "Show Develop menu in menu bar" - - 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` - - 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) - -## To Wrap in Post-provision automation - -The following tasks have to wait for the initial Dropbox sync to complete before they'll succeed. So ideally I'll stick this all in a post-provision script but somehow flag it not to run on first provision. - -``` -# ZSH Aliases. -ln -s /Users/jgeerling/Dropbox/Apps/Config/.aliases /Users/jgeerling/.aliases - -# Electrum BTC Wallet. -ln -s /Users/jgeerling/Dropbox/Apps/Electrum/default_wallet /Users/jgeerling/.electrum/wallets/default_wallet - -# SSH setup. -ssh-keygen # and create a default key to set up .ssh folder -sudo ln -s /Users/jgeerling/Dropbox/Apps/Config/ssh/config ~/.ssh/config -# TODO - Manually copy any shared SSH keys that are needed. - -# Ansible setup. -sudo mkdir -p /etc/ansible -sudo ln -s /Users/jgeerling/Dropbox/Apps/Config/ansible/ansible.cfg /etc/ansible/ansible.cfg -sudo ln -s /Users/jgeerling/Dropbox/Apps/Config/ansible/hosts /etc/ansible/hosts -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 - -# Final Cut Pro setup. (Open Motion first) -cp -r /Users/jgeerling/Dropbox/Apps/Config/Motion/Motion\ Templates.localized/ /Users/jgeerling/Movies/Motion\ Templates.localized/ -cp -r /Users/jgeerling/Dropbox/Apps/Config/Motion/Text\ Styles/ /Users/jgeerling/Library/Application\ Support/Motion/Library/Text\ Styles.localized/ - -# Sequel Ace favorites. (Open Sequel Ace first) -cp /Users/jgeerling/Dropbox/Apps/Config/Sequel\ Ace/Favorites.plist /Users/jgeerling/Library/Containers/com.sequel-ace.sequel-ace/Data/Library/Application\ Support/Sequel\ Ace/Data/Favorites.plist - -# Font setup. -cp ~/Dropbox/Apps/Config/Fonts/* ~/Library/Fonts/ - -# Vim setup. -mkdir -p ~/.vim/autoload -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 -``` - -## When formatting old Mac - - - Sign out of Adobe Creative Cloud - - Sign out of Panic Sync in Transmit - - Deauthorize Apple Music in iTunes/Music App - - Make sure anything new merged into `~/Dropbox/Apps/Config`: - - Fonts from ~/Library/Fonts - - 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 [here](https://support.apple.com/en-au/HT212749) diff --git a/inventory b/inventory index 5b7201063..860c520f3 100644 --- a/inventory +++ b/inventory @@ -1,2 +1,2 @@ [all] -127.0.0.1 ansible_connection=local +this.laptop ansible_connection=local diff --git a/main.yml b/main.yml deleted file mode 100644 index 500c91766..000000000 --- a/main.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -- name: Configure host. - hosts: all - - vars_files: - - default.config.yml - - pre_tasks: - - name: Include playbook configuration. - include_vars: "{{ item }}" - with_fileglob: - - "{{ playbook_dir }}/config.yml" - tags: ['always'] - - roles: - - role: elliotweiser.osx-command-line-tools - - role: geerlingguy.mac.homebrew - tags: ['homebrew'] - - role: geerlingguy.dotfiles - when: configure_dotfiles - tags: ['dotfiles'] - - role: geerlingguy.mac.mas - when: mas_installed_apps or mas_installed_app_ids - tags: ['mas'] - - role: geerlingguy.mac.dock - when: configure_dock - tags: ['dock'] - - tasks: - - import_tasks: tasks/sudoers.yml - when: configure_sudoers - tags: ['sudoers'] - - - import_tasks: tasks/terminal.yml - when: configure_terminal - tags: ['terminal'] - - - import_tasks: tasks/osx.yml - when: configure_osx - tags: ['osx'] - - - import_tasks: tasks/extra-packages.yml - tags: ['extra-packages'] - - - import_tasks: tasks/sublime-text.yml - when: configure_sublime - tags: ['sublime-text'] - - - 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) }}" diff --git a/playbooks/srere-laptop-setup.yml b/playbooks/srere-laptop-setup.yml new file mode 100644 index 000000000..250da3e16 --- /dev/null +++ b/playbooks/srere-laptop-setup.yml @@ -0,0 +1,46 @@ +- name: SRERE Laptop Setup + hosts: all + gather_facts: true + environment: + # Setting this so any homebrew action points to the internal brew repo + HOMEBREW_ARTIFACT_DOMAIN: "{{ homebrew_artifact_domain }}" + + vars_files: + - ../vars_files/default.srere-laptop-setup.yml + + pre_tasks: + - import_tasks: ../tasks/homebrew-repo-setup.yml + tags: + - homebrew + - homebrew-repo-setup + + roles: + - role: geerlingguy.mac.homebrew + tags: ["homebrew"] + environment: + HOMEBREW_DOCKER_REGISTRY_TOKEN: "{{ homebrew_jfrog_token }}" + + tasks: + - import_tasks: ../tasks/zshrc-setup.yml + when: zshrc_setup + tags: ["zshrc-setup"] + - import_tasks: ../tasks/managed-user-scripts-setup.yml + when: managed_user_scripts + tags: ["managed-user-scripts-setup"] + - import_tasks: ../tasks/ssh-key-setup.yml + when: ssh_key_setup + tags: ["ssh-key-setup"] + - import_tasks: ../tasks/ssh-config-setup.yml + when: ssh_config_setup + tags: ["ssh-config-setup"] + - import_tasks: ../tasks/git-config.yml + when: git_config + tags: ["git-config"] + - import_tasks: ../tasks/github-setup.yml + when: github_setup + tags: ["github-setup"] + - import_tasks: ../tasks/helm-repo-setup.yml + tags: ["helm-repo-setup"] + - import_tasks: ../tasks/gcloud-cli-setup.yml + when: gcloud_cli_setup + tags: ["gcloud-cli-setup"] diff --git a/requirements.yml b/requirements.yml index f5815ad80..fad092e50 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,7 +1,6 @@ --- roles: - name: elliotweiser.osx-command-line-tools - - name: geerlingguy.dotfiles collections: - name: geerlingguy.mac diff --git a/tasks/gcloud-cli-setup.yml b/tasks/gcloud-cli-setup.yml new file mode 100644 index 000000000..2c3356081 --- /dev/null +++ b/tasks/gcloud-cli-setup.yml @@ -0,0 +1,22 @@ +- name: Run gcloud auth login + ansible.builtin.command: + cmd: gcloud auth login + creates: "{{ '~/.config/gcloud/configurations/config_default' | expanduser }}" + +- name: Run gcloud auth application-default login + ansible.builtin.command: + cmd: gcloud auth application-default login + creates: "{{ '~/.config/gcloud/application_default_credentials.json' | expanduser }}" + +- name: Test gcloud cli account config + ansible.builtin.command: gcloud config get-value account + register: gcloud_cli_account_config + changed_when: false + +- name: Fail if account config value does not match + ansible.builtin.fail: + msg: | + Output value of command "gcloud cli account config" does not match {{ user_email }} + Its possible you need to run: + gcloud auth login && gcloud auth application-default login + when: user_email not in gcloud_cli_account_config.stdout diff --git a/tasks/git-config.yml b/tasks/git-config.yml new file mode 100644 index 000000000..6e7154326 --- /dev/null +++ b/tasks/git-config.yml @@ -0,0 +1,35 @@ +- name: Ensure Git Config globally values set for GPG Signing + git_config: + name: "{{ item.name }}" + value: "{{ item.value }}" + scope: global + with_items: + - name: gpg.format + value: ssh + - name: user.signingkey + value: "{{ ssh_key_path }}" + - name: commit.gpgsign + value: true + +- name: Ensure Git Name is set to {{ user_full_name }} + git_config: + name: user.name + value: "{{ user_full_name }}" + scope: global + +- name: Ensure Git Email is set to {{ user_email }} + git_config: + name: user.email + value: "{{ user_email }}" + scope: global + +- name: Ensure Git global configs for better DX + git_config: + name: "{{ item.name }}" + value: "{{ item.value }}" + scope: global + with_items: + - name: init.defaultBranch + value: main + - name: push.autoSetupRemote + value: true diff --git a/tasks/github-setup.yml b/tasks/github-setup.yml new file mode 100644 index 000000000..8643f8e1d --- /dev/null +++ b/tasks/github-setup.yml @@ -0,0 +1,57 @@ +- name: Verify GitHub authentication + ansible.builtin.command: gh auth status + register: gh_auth_status1 + ignore_errors: true + changed_when: false + +- name: Prompt user to run `gh auth login` + when: + - "'Logged in to github.com account' not in gh_auth_status1.stdout" + - "'Active account: true' not in gh_auth_status1.stdout" + - "'Git operations protocol: ssh' not in gh_auth_status1.stdout" + - "'admin:ssh_signing_key' not in gh_auth_status1.stdout" + ansible.builtin.pause: + prompt: | + + ================================================================================================ + ** Please open a new terminal window and run the following command to authenticate with GitHub** + + gh auth login --git-protocol ssh --web {{ "--scopes admin:ssh_signing_key" if github_add_ssh_signing_key else "" }} + + ** Make sure to select the SSH Key {{ ssh_key_path }} to upload to GitHub + ** Give the key a useful name eg. thescore-laptop. The default GitHub CLI is not useful. + + Once you have completed the authentication process, press ENTER to continue. + +- name: Verify GitHub authentication after user action + ansible.builtin.command: gh auth status + register: gh_auth_status + ignore_errors: true + changed_when: false + when: gh_auth_status1.rc != 0 + +- name: Fail if GitHub authentication status is not correct + ansible.builtin.fail: + msg: | + GitHub authentication failed. Please ensure you have authenticated successfully using the GitHub CLI. + when: + - gh_auth_status2 is defined # we don't perform this check if we did not verify the auth status again which won't happen unless the first one failed + - gh_auth_status2.rc != 0 + - "'Logged in to github.com account' not in gh_auth_status2.stdout" + - "'Active account: true' not in gh_auth_status2.stdout" + - "'Git operations protocol: ssh' not in gh_auth_status2.stdout" + +- name: Fail if GitHub authentication key scope is not correct and github_add_ssh_signing_key is true + ansible.builtin.fail: + msg: | + GitHub authentication failed. Please ensure you have authenticated successfully using the GitHub CLI. + when: + - gh_auth_status2 is defined # we don't perform this check if we did not verify the auth status again which won't happen unless the first one failed + - github_add_ssh_signing_key + - "'admin:ssh_signing_key' not in gh_auth_status2.stdout" +# - name: Get a list of SSH keys used for signing +# ansible.builtin.command: gh ssh-key list | grep signing +# register: gh_ssh_key_list +# when: github_add_ssh_signing_key +# - name: Load the public SSH Key used for signing +# when: github_add_ssh_signing_key diff --git a/tasks/helm-repo-setup.yml b/tasks/helm-repo-setup.yml new file mode 100644 index 000000000..ded275320 --- /dev/null +++ b/tasks/helm-repo-setup.yml @@ -0,0 +1,40 @@ +# Setup the helm repo that points to https://thescore.jfrog.io/artifactory/api/helm/thescore-helm +- name: Check helm jfrog Helm API key is stored in Apple Keychain + ansible.builtin.command: security find-generic-password -w -s 'artifactory_helm_token' -a "{{ user_email }}" + register: helm_token_lookup + changed_when: false + failed_when: false + +- name: Prompt for jfrog API key for Helm if its not stored + pause: + prompt: Please enter your jfrog API key for Helm + echo: false + when: helm_token_lookup.rc != 0 + register: helm_token_user_input + +- name: Store helm jfrog API key in Apple Keychain + ansible.builtin.command: security add-generic-password -s 'artifactory_helm_token' -a "{{ user_email }}" -w '{{ helm_token_user_input.user_input }}' + when: helm_token_lookup.rc != 0 + +- name: Retrive helm jfrog Helm API key from Apple Keychain + ansible.builtin.command: security find-generic-password -w -s 'artifactory_helm_token' -a "{{ user_email }}" + register: helm_token_lookup + changed_when: false + +- name: Add helm thescore-helm repository + kubernetes.core.helm_repository: + name: thescore-helm + repo_url: https://thescore.jfrog.io/artifactory/api/helm/thescore-helm + repo_username: "{{ user_email }}" + repo_password: "{{ helm_token_lookup.stdout_lines[0] }}" + +- name: Confirm helm repository access is working + ansible.builtin.command: helm search repo thescore-helm -l + failed_when: false + changed_when: false + register: helm_thescore_repo_test + +- name: Fail if the helm repo search fails + ansible.builtin.fail: + msg: Unable to list repository thescore-helm. Its possible you don't have proper access or internet is down. You can run the command helm search repo thescore-helm -l to try this out + when: helm_thescore_repo_test.rc != 0 diff --git a/tasks/homebrew-repo-setup.yml b/tasks/homebrew-repo-setup.yml new file mode 100644 index 000000000..7365d16b4 --- /dev/null +++ b/tasks/homebrew-repo-setup.yml @@ -0,0 +1,25 @@ +- name: Check homebrew jfrog API key is stored in Apple Keychain + ansible.builtin.command: security find-generic-password -w -s 'artifactory_homebrew_token' -a "{{ user_email }}" + register: homebrew_token_lookup + changed_when: false + failed_when: false + +- name: Prompt for jfrog API key for homebrew if its not stored + pause: + prompt: Please enter your jfrog API key for homebrew + echo: false + when: homebrew_token_lookup.rc != 0 + register: homebrew_token_user_input + +- name: Store homebrew jfrog API key in Apple Keychain + ansible.builtin.command: security add-generic-password -s 'artifactory_homebrew_token' -a "{{ user_email }}" -w '{{ homebrew_token_user_input.user_input }}' + when: homebrew_token_lookup.rc != 0 + +- name: Retrive homebrew jfrog API key from Apple Keychain + ansible.builtin.command: security find-generic-password -w -s 'artifactory_homebrew_token' -a "{{ user_email }}" + register: homebrew_token_lookup + changed_when: false + +- name: Set fact homebrew token + ansible.builtin.set_fact: + homebrew_jfrog_token: "{{ homebrew_token_lookup.stdout_lines[0] }}" diff --git a/tasks/managed-user-scripts-setup.yml b/tasks/managed-user-scripts-setup.yml new file mode 100644 index 000000000..c717065b5 --- /dev/null +++ b/tasks/managed-user-scripts-setup.yml @@ -0,0 +1,13 @@ +- name: Ensure {{ managed_user_script_dir }} exists and all permissions are set to 0700 + ansible.builtin.file: + path: "{{ managed_user_script_dir }}" + state: directory + mode: "0700" + recurse: yes + +- name: Ensure the templated files in .zshrc.d are up to date + ansible.builtin.template: + src: "templates/user_home/.local/managed_bin/{{ item }}.j2" + dest: "{{ managed_user_script_dir }}/{{ item }}" + mode: "0700" + with_items: "{{ managed_user_script_files }}" diff --git a/tasks/ssh-config-setup.yml b/tasks/ssh-config-setup.yml new file mode 100644 index 000000000..9e8f93caa --- /dev/null +++ b/tasks/ssh-config-setup.yml @@ -0,0 +1,5 @@ +- name: Ensure the templated file ~/.ssh/config is placed + ansible.builtin.template: + src: user_home/.ssh/config.j2 + dest: "~/.ssh/config" + backup: true diff --git a/tasks/ssh-key-setup.yml b/tasks/ssh-key-setup.yml new file mode 100644 index 000000000..fd6847f1a --- /dev/null +++ b/tasks/ssh-key-setup.yml @@ -0,0 +1,17 @@ +- name: Check if the SSH key exists in "{{ ssh_key_path }}" + ansible.builtin.stat: + path: "{{ ssh_key_path }}" + register: ssh_key_file_stat + +- name: Error if the SSH Key is not a file if it exists + ansible.builtin.fail: + msg: The ssh key file that already exists is not a file {{ ssh_key_path }} + when: + - ssh_key_file_stat.stat.exists + - ssh_key_path is not file + +- name: Generate SSH Key + ansible.builtin.command: + cmd: ssh-keygen -t rsa -b 4096 -f "{{ ssh_key_path }}" + creates: "{{ ssh_key_path }}" + when: not ssh_key_file_stat.stat.exists diff --git a/tasks/templates/.zshrc.d/0-functions.sh.j2 b/tasks/templates/.zshrc.d/0-functions.sh.j2 new file mode 100644 index 000000000..1e1f32ae3 --- /dev/null +++ b/tasks/templates/.zshrc.d/0-functions.sh.j2 @@ -0,0 +1,46 @@ + +vault-login() { + #default to non-prod + local token_file=$HOME/.vault-token + + VAULT_ENVIRONMENT="${1:-non-prod}" + + if [ "$VAULT_ENVIRONMENT" = "help" ]; then + echo "$(basename "$0") [prod]" + return 0 + fi + + export VAULT_ADDR="https://vault.${VAULT_ENVIRONMENT}.thescore.is" + + if [ -f $token_file ]; then + echo "** Loading existing token file in $token_file" + export VAULT_TOKEN=$(cat $token_file) + fi + + if vault token lookup > /dev/null 2>&1; then + echo "** Already logged in to $VAULT_ADDR" + else + unset VAULT_TOKEN + if vault login -method=oidc -format=json; then + export VAULT_TOKEN=$(cat $token_file) + echo "** Logged in to $VAULT_ADDR" + else + echo "** vault login failed" + unset VAULT_ADDR + unset VAULT_TOKEN + unset VAULT_ENVIRONMENT + return 1 + fi + fi + + export VAULT_ENVIRONMENT + return 0 +} + +docker-login() { + echo $(security find-generic-password -w -s 'artifactory_docker_token' -a "{{ user_email }}") | docker login thescore.jfrog.io --password-stdin --username "{{ user_email }}" +} + +reload-shell() { + source ~/.zshrc +} diff --git a/tasks/templates/.zshrc.d/0-homebrew.sh.j2 b/tasks/templates/.zshrc.d/0-homebrew.sh.j2 new file mode 100644 index 000000000..3e252e386 --- /dev/null +++ b/tasks/templates/.zshrc.d/0-homebrew.sh.j2 @@ -0,0 +1,3 @@ +export HOMEBREW_ARTIFACT_DOMAIN="{{ homebrew_artifact_domain }}" +export HOMEBREW_DOCKER_REGISTRY_TOKEN="$(security find-generic-password -w -s 'artifactory_homebrew_token' -a "{{ user_email }}")" +eval "$(/opt/homebrew/bin/brew shellenv)" diff --git a/tasks/templates/.zshrc.d/0-path.sh.j2 b/tasks/templates/.zshrc.d/0-path.sh.j2 new file mode 100644 index 000000000..863514287 --- /dev/null +++ b/tasks/templates/.zshrc.d/0-path.sh.j2 @@ -0,0 +1,8 @@ +{% if 'libpq' in homebrew_installed_packages %} +export PATH="$PATH:/opt/homebrew/opt/libpq/bin" +{% endif %} + +export PATH="{{ managed_user_script_dir }}:$PATH" + +# Add Visual Studio Code (code) +export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" diff --git a/tasks/templates/.zshrc.j2 b/tasks/templates/.zshrc.j2 new file mode 100644 index 000000000..e37315d90 --- /dev/null +++ b/tasks/templates/.zshrc.j2 @@ -0,0 +1,24 @@ +# {{ ansible_managed }} +# Please place all your custom zshrc files in ~/.zshrc.d/ +# They will be loaded in the alphabetical order. +# You can use numbers to denoate precedence ex 1-global-stuff 2-mystuff + +ZSHRC_DIR={{ zshrc_zshrc_d_path }} + +# load the Ansible distributed .zshrc files +for FILE in "$ZSHRC_DIR"/ansible-managed/*; do + if [ -f "$FILE" ]; then + source "$FILE" + fi +done + +# Check if the directory is empty +if [ -n "$(ls -A "$ZSHRC_DIR" 2>/dev/null)" ]; then + for FILE in "$ZSHRC_DIR"/*; do + if [ -f "$FILE" ]; then + source "$FILE" + fi + done +else + echo "No custom zshrc files to load in $ZSHRC_DIR" +fi diff --git a/tasks/templates/user_home/.ssh/config.j2 b/tasks/templates/user_home/.ssh/config.j2 new file mode 100644 index 000000000..f6efe6d38 --- /dev/null +++ b/tasks/templates/user_home/.ssh/config.j2 @@ -0,0 +1,6 @@ +Host * + UseKeychain yes + AddKeysToAgent yes + + ForwardAgent yes + IdentityFile {{ ssh_key_path }} diff --git a/tasks/zshrc-setup.yml b/tasks/zshrc-setup.yml new file mode 100644 index 000000000..1e848d2d6 --- /dev/null +++ b/tasks/zshrc-setup.yml @@ -0,0 +1,35 @@ +- name: Ensure the templated file .zshrc is up to date + ansible.builtin.template: + src: .zshrc.j2 + dest: "~/.zshrc" + backup: true + +- name: Ensure {{ zshrc_zshrc_d_path }} exists and all permissions are set to 0700 + ansible.builtin.file: + path: "{{ zshrc_zshrc_d_path }}" + state: directory + mode: "0700" + recurse: yes + +- name: Ensure {{ zshrc_zshrc_d_path }}/ansible-managed exists and all permissions are set to 0700 + ansible.builtin.file: + path: "{{ zshrc_zshrc_d_path }}/ansible-managed" + state: directory + mode: "0700" + recurse: yes + +- name: Ensure the templated files in .zshrc.d are up to date + ansible.builtin.template: + src: "templates/.zshrc.d/{{ item }}.j2" + dest: "{{ zshrc_zshrc_d_path }}/ansible-managed/{{ item }}" + with_items: + - 0-functions.sh + - 0-homebrew.sh + - 0-path.sh + +- name: Ensure the templated files in .zshrc.d are absent + ansible.builtin.file: + path: "{{ zshrc_zshrc_d_path }}/ansible-managed/{{ item }}" + state: absent + with_items: + - 0-ssh-key-agent.sh diff --git a/vars_files/default.srere-laptop-setup.yml b/vars_files/default.srere-laptop-setup.yml new file mode 100644 index 000000000..e53e9fe4e --- /dev/null +++ b/vars_files/default.srere-laptop-setup.yml @@ -0,0 +1,50 @@ +configure_terminal: false +configure_osx: false +configure_dock: false +homebrew_installed_packages: + - ansible + - gh + - git + - hashicorp/tap/vault + - helm + - k9s + - kubectl + - kubectx + - libpq #pgsql toolset - lightweight than full postgres + - python + - terraform + - terragrunt + +homebrew_uninstalled_packages: [] + +homebrew_cask_apps: + - google-cloud-sdk + +homebrew_taps: + - hashicorp/tap + +homebrew_artifact_domain: https://thescore.jfrog.io/artifactory/homebrew + +dotfiles_files: [] + +gcloud_cli_setup: true + +git_config: true + +github_add_ssh_signing_key: true +github_setup: true + +managed_user_script_dir: "{{ '~/.local/managed_bin' | expanduser }}" +managed_user_script_files: [] +managed_user_scripts: true + +ssh_config_setup: true + +ssh_key_path: "{{ '~/.ssh/id_rsa' | expanduser }}" +ssh_key_setup: true + +user_email: "{{ ansible_user_id + '@thescore.com' }}" +user_full_name: "{{ ansible_user_id.split('.')[0] | capitalize }} {{ ansible_user_id.split('.')[-1] | capitalize }}" + +zshrc_setup: true +zshrc_zshrc_d_path: "~/.zshrc.d"