https://github.com/Dalokae/mac-playbook
🖥 Mac setup and configuration via Ansible
https://github.com/Dalokae/mac-playbook
ansible macos
Last synced: about 1 year ago
JSON representation
🖥 Mac setup and configuration via Ansible
- Host: GitHub
- URL: https://github.com/Dalokae/mac-playbook
- Owner: Dalokae
- License: mit
- Created: 2018-10-11T06:27:52.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T08:50:30.000Z (over 1 year ago)
- Last Synced: 2025-04-03T06:12:28.351Z (about 1 year ago)
- Topics: ansible, macos
- Language: Jinja
- Homepage:
- Size: 402 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mac Ansible Playbook
The Web server (nginx), PHP and the services (MariaDB, PostgreSQL, Mailpit) are installed locally with Ansible.
All the management of the system (configuration, update, etc) goes through this tool which allows everyone to have a similar environment.
## Install
You must first clone the repository to setup the environment.
```shell
$ xcode-select --install
$ git clone https://github.com/Dalokae/mac-playbook.git ~/.mac-playbook
# With SSH
$ git clone git@github.com:Dalokae/mac-playbook.git ~/.mac-playbook
```
Then you have to configure the environment:
```shell
$ cd ~/.mac-playbook
$ touch config.yml
$ vim config.yml
```
You can look in the file `default.config.yml` to customize your environment.
Example :
```yaml
---
############
# SYSTEM #
############
edit_dev_config_with: code
homebrew_cask_packages:
- tableplus
- iterm2
- alfred
- code
############
# dotfiles #
############
zsh_theme: agnoster
#########
# GIT #
#########
git_user_name: John Doe
git_user_email: john@doe.fr
###########
# Nginx #
###########
nginx_sites:
- name: wallabag
server_name: wallabag.localhost
type: symfony
root: "~/dev/wallabag/web"
php_version: '8.3'
```
Homebrew is needed, see https://brew.sh/ to install it.
Then :
```shell
# Edit your bashrc or zshrc to include "export PIPX_HOME=$HOME/.local/pipx"
# To bootstrap with a specific Ansible version: make bootstrap ansible_version_spec="<2.18"
$ make bootstrap
$ make setup-mkcert
```
And to finish : reboot the computer.
From there, you can use the **dev** binary to manage the environment.
## Save password
To avoid having to enter the SUDO password all the time we will encrypt our SUDO password with a password that will be stored in the keychain :
```shell
$ ./scripts/generate-ansible-password
```
## Usages
To list all commands just type `dev`.
## License
[mac-playbook](https://github.com/Dalokae/mac-playbook) is licensed under the [MIT license](LICENSE).