Skip to content

Commit

Permalink
Various fixes to get all roles running successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
mpereira committed Mar 13, 2021
1 parent f616143 commit d0b6259
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 41 deletions.
10 changes: 7 additions & 3 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
tags: [foundational, package-and-build, bespoke-pkg, mac-ports]
vars:
# https://www.macports.org/install.php
macports_version: "2.6.4_1"
macports_version: "2.6.4"
macports_pkg_version: "1"
macports_mac_release: "11-BigSur"

- role: node
Expand Down Expand Up @@ -358,8 +359,9 @@
- role: teensy-loader
tags: [desktop-applications, bespoke-pkg, teensy-loader]

# DISABLED: the YNAB 4 binary isn't available in the YNAB website anymore.
- role: ynab
tags: [desktop-applications, bespoke-pkg, ynab]
tags: [disabled, desktop-applications, bespoke-pkg, ynab]
vars:
ynab_version: "4.3.855"

Expand Down Expand Up @@ -476,8 +478,10 @@
# Virtualization, provisioning, containers and system tools #################
#############################################################################

# DISABLED: not working on Big Sur yet:
# https://openzfsonosx.org/forum/viewtopic.php?f=20&t=3468
- role: openzfs
tags: [system-tools, brew-cask-pkg, openzfs]
tags: [disabled, system-tools, brew-cask-pkg, openzfs]

- role: virtualbox
tags: [system-tools, bespoke-pkg, virtualbox]
Expand Down
2 changes: 2 additions & 0 deletions roles/elgato-dock/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
command: >
installer -package "{{ downloads_directory}}/Elgato_Thunderbolt_Dock_Software_{{ elgato_dock_version }}.pkg" -target /
become: yes
# NOTE: ignoring errors because installing this seems to fail sporadically.
ignore_errors: yes
1 change: 0 additions & 1 deletion roles/fish-foreign-env/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
git:
repo: "https://github.com/oh-my-fish/plugin-foreign-env.git"
dest: "{{ home_directory }}/.config/fish/plugin-foreign-env"
version: "{{ fish_foreign_env_version }}"
7 changes: 1 addition & 6 deletions roles/google-chrome-as-default-browser/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
- name: Check if Google Chrome is the default browser
command: defaultbrowser
register: is_google_chrome_the_default_browser

- name: Make Google Chrome the default browser
command: defaultbrowser -set chrome
when: "is_google_chrome_the_default_browser.stdout.find('Current: chrome') == -1"
command: defaultbrowser chrome
6 changes: 3 additions & 3 deletions roles/graalvm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
- name: Download GraalVM
get_url:
url: "https://github.com/oracle/graal/releases/download/vm-{{ graalvm_version }}/graalvm-ce-darwin-amd64-{{ graalvm_version }}.tar.gz"
url: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-{{ graalvm_version }}/{{ graalvm_archive }}"
dest: "{{ downloads_directory }}/{{ graalvm_archive }}"

- name: Extract GraalVM
unarchive:
src="{{ downloads_directory }}/{{ graalvm_archive }}"
dest="{{ downloads_directory }}"
creates="{{ downloads_directory }}/{{ graalvm_directory }}"
creates="{{ downloads_directory }}/{{ graalvm_extracted_directory }}"

- name: Install GraalVM
command: cp -R "{{ downloads_directory }}/{{ graalvm_directory }}" "/Applications/GraalVM-{{ graalvm_version }}.app"
command: cp -R "{{ downloads_directory }}/{{ graalvm_extracted_directory }}" "/Applications/GraalVM-{{ graalvm_version }}.app"

- name: Install native-image utility
command: /Applications/GraalVM-{{ graalvm_version }}.app/Contents/Home/bin/gu install native-image
6 changes: 4 additions & 2 deletions roles/graalvm/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
graalvm_archive: "graalvm-ce-darwin-amd64-{{ graalvm_version }}.tar.gz"
graalvm_directory: "graalvm-ce-{{ graalvm_version }}"
graalvm_java_version: "java11"
graalvm_directory: "graalvm-ce-{{ graalvm_java_version }}-darwin-amd64-{{ graalvm_version }}"
graalvm_archive: "{{ graalvm_directory }}.tar.gz"
graalvm_extracted_directory: "graalvm-ce-{{ graalvm_java_version }}-{{ graalvm_version }}"
2 changes: 1 addition & 1 deletion roles/gron/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Download and install gron binary
unarchive:
src: https://github.com/tomnomnom/gron/releases/latest/download/v{{ gron_version }}/gron-darwin-amd64-{{ gron_version }}.tgz
src: https://github.com/tomnomnom/gron/releases/download/v{{ gron_version }}/gron-darwin-amd64-{{ gron_version }}.tgz
dest: /usr/local/bin
mode: u+x
remote_src: yes
2 changes: 1 addition & 1 deletion roles/kubectl-tree/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- name: Install kubectl-tree
command: kubectl krew install tree
command: kubectl-krew install tree
2 changes: 1 addition & 1 deletion roles/mac-ports/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
macports_pkg: MacPorts-{{ macports_version }}-{{ macports_mac_release }}.pkg
macports_pkg: MacPorts-{{ macports_version }}_{{ macports_pkg_version }}-{{ macports_mac_release }}.pkg
1 change: 0 additions & 1 deletion roles/mpd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
homebrew:
name: mpd
state: latest
install_options: with-libshout,with-lame,with-flac,with-lastfm

# FIXME: this seems to fail if the service is already started.
- name: Create mpd service and start mpd
Expand Down
4 changes: 0 additions & 4 deletions roles/openzfs/vars/main.yml

This file was deleted.

14 changes: 7 additions & 7 deletions roles/virtualbox/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
ignore_errors: yes

- name: Mount VirtualBox image
command: >
chdir={{ downloads_directory }}
hdiutil attach -nobrowse VirtualBox-{{ virtualbox_version }}-{{ virtualbox_build }}-OSX.dmg
creates=/Volumes/VirtualBox
when: virtualbox_version_output.stdout.find('VirtualBox Manager ' ~ virtualbox_version) == -1
command:
chdir: "{{ downloads_directory }}"
cmd: "hdiutil attach -nobrowse VirtualBox-{{ virtualbox_version }}-{{ virtualbox_build }}-OSX.dmg"
creates: /Volumes/VirtualBox
when: virtualbox_version_output.rc != 0 or virtualbox_version_output.stdout.find(virtualbox_version) == -1

- name: Install VirtualBox
command: >
installer -package /Volumes/VirtualBox/VirtualBox.pkg -target /
become: yes
when: virtualbox_version_output.stdout.find('VirtualBox Manager ' ~ virtualbox_version) == -1
when: virtualbox_version_output.rc != 0 or virtualbox_version_output.stdout.find(virtualbox_version) == -1

- name: Unmount VirtualBox image
command: hdiutil detach /Volumes/VirtualBox
when: virtualbox_version_output.stdout.find('VirtualBox Manager ' ~ virtualbox_version) == -1
when: virtualbox_version_output.rc != 0 or virtualbox_version_output.stdout.find(virtualbox_version) == -1
16 changes: 8 additions & 8 deletions roles/vlc/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
- name: Download VLC
get_url:
url: http://get.videolan.org/vlc/{{ vlc_version }}/macosx/{{ vlc_dmg }}
url: "https://get.videolan.org/vlc/{{ vlc_version }}/macosx/{{ vlc_dmg }}"
dest: "{{ downloads_directory }}/{{ vlc_dmg }}"

- name: Mount VLC image
command: >
chdir={{ downloads_directory }}
hdiutil attach -nobrowse {{ vlc_dmg }}
creates=/Volumes/{{ vlc_volume }}
command:
chdir: "{{ downloads_directory }}"
cmd: hdiutil attach -nobrowse "{{ vlc_dmg }}"
creates: "/Volumes/{{ vlc_volume }}"

- name: Copy VLC.app to Applications directory
command: >
cp -R /Volumes/{{ vlc_volume }}/VLC.app /Applications
shell: >
rm -rf /Applications/VLC.app && cp -R "/Volumes/{{ vlc_volume }}/VLC.app" /Applications
become: yes

- name: Unmount VLC image
command: hdiutil detach /Volumes/{{ vlc_volume }}
command: hdiutil detach "/Volumes/{{ vlc_volume }}"
4 changes: 2 additions & 2 deletions roles/vlc/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
vlc_name: vlc-{{ vlc_version }}
vlc_name: vlc-{{ vlc_version }}-intel64
vlc_dmg: "{{ vlc_name }}.dmg"
vlc_volume: "{{ vlc_name }}"
vlc_volume: "VLC media player"
1 change: 0 additions & 1 deletion roles/yapf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
- name: Install Yapf
pip:
name: yapf
version: "{{ yapf_version }}"
extra_args: --user

0 comments on commit d0b6259

Please sign in to comment.