Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
docs(README): reformat, update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Feb 15, 2023
1 parent f133d13 commit d49611a
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,19 @@ Ansible role that installs the asdf version manager on OSX machines.
Requirements
------------

- Homebrew must aleady be present on the machine ([geerlingguy.mac.hombrew](https://github.com/geerlingguy/ansible-collection-mac) is a great solution for this).
- See the [homebrew website](https://brew.sh/) for further details about this tool.
- [Homebrew](https://brew.sh/) must already be present on the machine ([geerlingguy.mac.homebrew](https://github.com/geerlingguy/ansible-collection-mac) is a great solution for this).


Role Variables
--------------

Each plugin should be configured in the following format:

```yaml
asdf_plugins:
- name: "erlang" # a plugin name
environment: {} # an optional dictionary of environment variables for build configuration
pre_install: "" # an optional command to run directly before the installation (i.e. select a Python Interpreter for compilation)
repository: "" # a plugin repository, optional
versions: # a list of versions to install
- 23.3.3
- 23.3.4
delete_versions: [] # a list of existing versions that will be removed
global: 23.3.4 # set as a global version, optional
```
### Global Configuration

The following variables are also configured:
The following variables are globally configured:
- `asdf_version`:
- Sets the git tag of asdf.
- Sets the tag or branch of asdf to install.
- `asdf_user`:
- Sets a user for which the role is installed. This user needs to be able to run Homebrew to install dependencies required for asdf plugins.
- Sets a user for which the role is installed. This user needs to be able to run Homebrew to install the dependencies required for asdf plugins.
- For further details see the [geeringguy.mac.homebrew](https://github.com/geerlingguy/ansible-collection-mac) repository. (You may need to set the `homebrew_user` variable as well.)
- The default value will work fine if you're simply installing for the current user.
- `asdf_user_home`:
Expand All @@ -54,7 +41,22 @@ The following variables are also configured:
- `asdf_darwin_optional_dependencies`:
- Sets additional requirements that will be installed with any asdf plugin install.

[See The Default Values](defaults/main.yml)
### Global Package Manifest

Each plugin should be configured in the following dictionary:

```yaml
asdf_plugins:
- name: "erlang" # a plugin name
environment: {} # an optional dictionary of environment variables for build configuration
pre_install: "" # an optional command to run directly before the installation (i.e. select a Python Interpreter for compilation)
repository: "" # a plugin repository, optional
versions: # a list of versions to install
- 23.3.3
- 23.3.4
delete_versions: [] # a list of existing versions that will be removed
global: 23.3.4 # set as a global version, optional
```
### Plugin Specific Configuration
Expand All @@ -73,6 +75,10 @@ asdf_darwin_plugin_dependencies:
To create additional custom configurations simply create a task file in the [plugin_tasks](./tasks/plugins_darwin/plugin_tasks) folder in the format: `(PLUGIN_NAME).yaml`
(i.e. `python.yml`, `nodejs.yml`)

### Default Values

[See The Default Values](defaults/main.yml)

Dependencies
------------

Expand All @@ -82,9 +88,9 @@ Example Playbook
----------------

```yaml
- hosts: all
- hosts: web
roles:
- role: elliotweiser.osx-command-line-tools
- role: elliotweiser.osx-command-line-tools # Dependency of geerlingguy.mac.homebrew
- role: geerlingguy.mac.homebrew
- role: osx_provisioner.asdf
asdf_plugins:
Expand Down

0 comments on commit d49611a

Please sign in to comment.