-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from werne2j/cleanMacLogic
Clean mac logic
- Loading branch information
Showing
6 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# Get OS of host machine | ||
|
||
- name: Check Operating System | ||
shell: "uname" | ||
register: uname_result | ||
|
||
- name: Save the OS as host_os | ||
set_fact: | ||
host_os: "{{ uname_result.stdout | lower }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Set homebrew packages to install | ||
set_fact: | ||
brew_cask_packages: | ||
- "virtualbox" | ||
brew_packages: | ||
- "jq" | ||
- "gnu-tar" | ||
|
||
- name: Ensuring Homebrew Is Installed | ||
stat: | ||
path: "/usr/local/bin/brew" | ||
register: "homebrew_check" | ||
|
||
- name: Installing Homebrew | ||
command: "/usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'" | ||
when: not homebrew_check.stat.exists | ||
|
||
- name: Updating Homebrew | ||
homebrew: | ||
update_homebrew: true | ||
when: homebrew_check.stat.exists | ||
|
||
- name: Installing Homebrew Packages | ||
homebrew: | ||
name: "{{ item }}" | ||
state: "present" | ||
with_items: "{{ brew_packages }}" | ||
when: homebrew_check.stat.exists | ||
|
||
- name: Installing Homebrew Cask Packages | ||
homebrew_cask: | ||
name: "{{ item }}" | ||
state: "present" | ||
with_items: "{{ brew_cask_packages }}" | ||
when: homebrew_check.stat.exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
--- | ||
# tasks file for prereqs | ||
|
||
# Check if nested virtualization is enabled | ||
- import_tasks: setup_nested_virt.yml | ||
# install necessary virtualization plugins | ||
- name: Linux pre reqs setup | ||
block: | ||
- import_tasks: setup_nested_virt.yml | ||
- import_tasks: install_virtual_reqs.yml | ||
- import_tasks: install_kvm_plugin.yml | ||
when: host_os == "linux" | ||
|
||
# Install package requirements for contra-env-setup | ||
- import_tasks: install_virtual_reqs.yml | ||
|
||
# install the kvm plugin | ||
- import_tasks: install_kvm_plugin.yml | ||
# install homebrew and brew packages | ||
- name: Mac pre req setup | ||
import_tasks: install_mac_pre_reqs.yml | ||
when: host_os == "darwin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters