Ensure the following requirements are already installed and working on your local system:
- macOS 10.11 or 10.12
- Command Line Developer Tools
See here for assistance.
- Fork the repository at https://github.com/macsible/macsible.
- Clone the fork to your local system (this is now the repository you will use to store your own customisations).
- Navigate to the local clone using your terminal app of choice.
- Follow the usage instructions below.
- Commit and push any customisations to your local clone back upstream to your fork.
NOTE: All commands below are to be run from the same location as this README.md file.
A script is included to ensure certain dependencies are met:
- Install pip (if not already installed)
- Install Ansible (if not already installed)
- Create required files if not present: config.yml, config.local.yml, mac.yml, requirements.yml
- Download required Ansible Galaxy roles
To execute this script run:
bash init.sh
Default variables can be overridden in config.yml.
config.local.yml can be used to override config.yml which can be useful when you need to use different values for just a few variables on a specific system. By default config.local.yml is ignored by git.
If you decide to add/edit the roles listed in requirements.yml (highly encouraged!) then you'll need to make sure that those dependencies are in place before running your playbook. After editing requirements.yml you'll want to run the following command before running your playbook:
ansible-galaxy install -r requirements.yml --force
The primary Ansible playbook file is called mac.yml and can be run using the following command (asks for sudo password):
ansible-playbook mac.yml -K
To run only certain tags (e.g. firefox
and flux
):
ansible-playbook mac.yml -K -t "firefox,flux"