Ansible Modules homebrew and homebrew cask: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
=Overview= | =Overview= | ||
Install a Homebrew [[Brew_Concepts#Formula|formula]] or [[Brew_Concepts#Cask|cask]]. Also see: {{Internal|Brew_Operations#install|brew install}} | Install a Homebrew [[Brew_Concepts#Formula|formula]] or [[Brew_Concepts#Cask|cask]]. Also see: {{Internal|Brew_Operations#install|brew install}} | ||
To install a formula: | |||
<syntaxhighlight lang='yaml'> | |||
- name: Install bash | |||
homebrew: | |||
name: bash | |||
register: brew_install_result | |||
</syntaxhighlight> | |||
To install a cask: | |||
<syntaxhighlight lang='yaml'> | |||
- name: Install Corretto 11 | |||
homebrew_cask: | |||
name: corretto11 | |||
register: brew_install_result | |||
</syntaxhighlight> | |||
In both cases, <code>brew_install_result</code> is initialized to something similar to: |
Revision as of 19:06, 5 July 2021
External
- https://docs.ansible.com/ansible/latest/collections/community/general/homebrew_module.html
- https://docs.ansible.com/ansible/2.5/modules/homebrew_module.html
- https://docs.ansible.com/ansible/latest/collections/community/general/homebrew_cask_module.html
Internal
Overview
Install a Homebrew formula or cask. Also see:
To install a formula:
- name: Install bash
homebrew:
name: bash
register: brew_install_result
To install a cask:
- name: Install Corretto 11
homebrew_cask:
name: corretto11
register: brew_install_result
In both cases, brew_install_result
is initialized to something similar to: