This contains ansible code for setting up a Mac with various development related packages/apps for development work.
- homebrew apps/packages setup (completed)
- dotfile setup (WIP)
- mac configuration setup (WIP)
These steps have to be executed manually in order to get ansible onto local machine.
xcode-select --install
2. Set up SSH key for github access.
4. Install Homebrew.
Due to high possibility of running into permission issues when installing packages via homebrew, be sure to make sure the relevant permissions to folders have been given. This can be checked via brew doctor
.
brew install python
Read this for additional info on setting up python.
pip3 install --user --upgrade pip
OR
python3 -m pip install --user --upgrade pip
python3 -m pip install --user ansible
Python installer installs modules at /Users/<user>/Library/Python/<version number>/bin
.
Add to PATH.
export PATH=/Users/<user>/Library/Python/<version number>/bin:$PATH
echo "export PATH=/Users/$(whoami)/Library/Python/3.9/bin:$PATH" | tee -a ~/.zshrc
ansible-playbook main.yml -i inventory --ask-become-pass
It is possible to overwrite Ansible collection referenced in playbooks to test custom collections/changes/bug fixes
ANSIBLE_COLLECTIONS_PATH=<ansible-collection-top-level-directory> ansible-playbook -i inventory test-ansible-dev.yaml
where ansible-collection-top-level-directory
contains ansible_collections/<ansible-collection-path>
└── ansible_collections
└── community
└── general
oh-my-zsh
is used to customize the terminal shell. Theme used is Power10K
https://github.com/romkatv/powerlevel10k
Theme configuration file can be found at /files/dotfile/.p10k.zsh
.
iTerm profile can be found at /files/P10K.json
.
Color depends on 2 things:
- P10K configuration value
- iTerm color palette
For more iTerm color schemes: https://iterm2colorschemes.com/
To see how the different color code set in P10K file will be rendered, run:
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done