Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tasks for installing dependencies on Mac #14

Conversation

toby-griffiths
Copy link
Contributor

This detects the 'Darwin' OS family, and uses homebrew to install the dependencies if so.

Description

Splits out the steps for installing the following dependencies between Mac & linux…

  • Vagrant
  • VirtualBox
  • jq
  • Terraform

Then uses the homebrew & homebrew_cask modules to install the dependencies when on a Mac.

More changes are needed to get full Mac support, so perhaps you would prefer a new 'mac-support' development branch be targeted by this PR?

Motivation and Context

I'm using tads-boilerplate on a Mac, so using become: yes on the standardised package module fails with a warning about running as root, and Vagrant & VirtualBox need are casks, rather than standard homebrew packages, so I had to use homebrew_cask to install them.

We would also need to update the scripts/commands/install-dependencies.sh to install Ansible in a Mac way, but for now I've added a message to manually install this, if this is acceptable?

How Has This Been Tested?

I have run these on MacOS 12.6 and Ansible confirmed they were installed. I've not yet tested it will install them, however if there is an appetite for this PR I will remove those applications and re-test.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • Should I update the docs to suggest this now supports Mac, as there are other changes that are likely needed first?
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
    • I'm not sure how to do this
  • All new and existing tests passed.

This detects the 'Darwin' OS family, and uses homebrew to install the
dependencies if so.
This detects the apt-get command, used for installing Ansible, and if it
is missing, displays a message to install it manually first, before
continuing.
@toby-griffiths toby-griffiths mentioned this pull request Sep 26, 2022
This is needed in the get_ansible_remote_environments function.
This checks if the coreutils provided version of ls (installed via brew
`coreutils` package in `ansible/install-dependencies.yml`) exists (i.e.
are we on a Mac), and uses that if available.
@thomvaill
Copy link
Owner

Wonderful!
Thank you for your contribution @toby-griffiths !

@thomvaill thomvaill merged commit fc4df1d into thomvaill:master Oct 3, 2022
@toby-griffiths
Copy link
Contributor Author

Thanks for accepting. More to follow soon, hopefully.

I don't suppose you'd consider making this repo part of Hacktoberfest, by adding the hacktoberfest topic to the repo, would you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants