Ansible Playbook to setup local macOS / Linux.
Some roles are work in progress.
Library / Tool | Version |
---|---|
Ansible | 2.9.3 |
Homebrew | 2.2.4 |
Install Homebrew and Ansible.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install ansible
Install Xcode if it's not installed.
$ sudo xcodebuild -license
Install Java.
It may cause some problems during installing some brew packages, if it's not installed.
$ brew cask install java
$ sudo yum install ansible
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt update
$ sudo apt install ansible
$ git clone https://github.com/karayok/ansible-local.git
Set your user.email / user.name for global git config.
$ vi ansible-local/group_vars/[private|biz|biz-linux].yml
If you want to use multiple github accounts, edit roles/ssh/templates/ssh_config.j2
See : http://karage-ageta.hatenablog.com/entry/2016/10/11/191811
If you have your own ./ssh/config file, set the path to your config file in group_vars.
~/private_settings/
|- ssh/
|- templates/
|- ssh_config.j2
# Set path to your private settings directory
private_settings_dir: ~/private_settings/ssh/templates/
$ ansible-playbook setup.yml -i local -l [private|biz|biz-linux]
Run specific roles (use tags)
$ ansible-playbook setup.yml -i local -l [private|biz|biz-linux] --tags <name of tags e.g. brew>
Do :NeoBundleInstall
after starting vi.