|
|
|
|
|
by bloopernova
666 days ago
|
|
After corporate IT gives out a MacBook, we run a local-only Ansible script I wrote. It sets .zshrc, .zshenv, and .zshenv-private for tokens etc. It also uses Homebrew to install a bunch of packages, then creates various config files. It works well. Developer setup time went from days to less than 2 hours (corporate VPN is slow) Edited to add: Workflow is: 1. Install homebrew, xcode command line tools, Ansible, and then git+credential helper.
2. Clone repo (which ensures the new dev has correct roles/groups to access the repo)
3. Run Ansible.
Snippet of the Ansible script: ---
- name: Configure dev macOS
hosts: localhost
vars_prompt:
- name: githubtoken
prompt: What is your github token?
private: false
tasks:
- name: Create variable from brew prefix
ansible.builtin.command: "brew --prefix"
register: brew_prefix
changed_when: false
- name: Update Homebrew
community.general.homebrew:
update_homebrew: true
- name: Install GNU Coreutils
community.general.homebrew:
name: coreutils
state: present
|
|