Shell MIT

ansible-collection-mac

Collection of macOS automation tools for Ansible.

G

geerlingguy

Dernière activité 4 janv. 2026
geerlingguy/ansible-collection-mac

392

étoiles

109

forks

6

issues ouvertes

ansiblecollectionconfigurationhomebrewmacmacososxroles

Ce README est souvent en anglais.

Mac Collection for Ansible

MIT licensed Galaxy Collection CI

This collection includes helpful Ansible roles and content to help with macOS automation. For a good example of the collection's usage, see the Mac Dev Playbook.

Roles included in this collection (click on the link to see the role's README and documentation):

Installation

Install via Ansible Galaxy:

ansible-galaxy collection install geerlingguy.mac

Or include this collection in your playbook's requirements.yml file:

---
collections:
  - name: geerlingguy.mac

For a real-world example, see my Mac Dev Playbook's requirements file.

Role Requirements

Requires separate installation of the elliotweiser.osx-command-line-tools role. Because Ansible collections are not able to depend on roles, you will need to make sure that role is installed either by manually installing it with the ansible-galaxy command, or adding it under the roles section of your requirements.yml file:

---
roles:
  - name: elliotweiser.osx-command-line-tools

collections:
  - name: geerlingguy.mac

Usage

Here's an example playbook which installs some Mac Apps (assuming you are signed into the App Store), CLI tools via Homebrew, and Cask Apps using Homebrew:

- hosts: localhost
  connection: local
  gather_facts: false

  vars:
    mas_installed_app_ids:
      - 424389933 # Final Cut Pro
      - 497799835 # Xcode

    homebrew_installed_packages:
      - node
      - nvm
      - redis
      - ssh-copy-id
      - pv

    homebrew_cask_apps:
      - docker
      - firefox
      - google-chrome
      - vlc

  roles:
    - geerlingguy.mac.homebrew
    - geerlingguy.mac.mas

For a real-world usage example, see my Mac Dev Playbook.

See the full documentation for each role in the role's README, linked above.

License

MIT

Author

This collection was created by Jeff Geerling, author of Ansible for DevOps.

Projets similaires

Mac setup and configuration via Ansible.

Shellansibleautomationdeveloper
Ggeerlingguy
7,1 k étoiles1,9 k

Ansible-powered MacBook configuration

Shell
Aadamchainz
219 étoiles79

Shell scripts for automated macOS machine setup.

Shellhomebrewmacos-setup
Bbkuhlmann
517 étoiles77