summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorjkito <jkito@github>2022-11-20 16:09:56 +0530
committerkali kaneko (leap communications) <kali@leap.se>2023-02-21 17:38:06 +0100
commit29a4fc9d89c918bd49c8ef3e46986a874f879cf4 (patch)
tree7d633328280c96944ee8338a1cd71e719214ee32 /scripts
parentebecaf5ba32a8bd58899a050d41ef3eb7db281fc (diff)
[build] Add ansible playbook to setup build env on macos
this playbook installs homebrew, and QtIFW on the target macos host and other build dependencies like go, make, etc. from brew
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ansible/macos/inventory.yaml5
-rw-r--r--scripts/ansible/macos/requirements.yaml6
-rw-r--r--scripts/ansible/macos/site.yaml57
3 files changed, 68 insertions, 0 deletions
diff --git a/scripts/ansible/macos/inventory.yaml b/scripts/ansible/macos/inventory.yaml
new file mode 100644
index 0000000..bbf2136
--- /dev/null
+++ b/scripts/ansible/macos/inventory.yaml
@@ -0,0 +1,5 @@
+all:
+ hosts:
+ localhost:
+ ansible_user: testmac
+ ansible_port: 22220
diff --git a/scripts/ansible/macos/requirements.yaml b/scripts/ansible/macos/requirements.yaml
new file mode 100644
index 0000000..fad092e
--- /dev/null
+++ b/scripts/ansible/macos/requirements.yaml
@@ -0,0 +1,6 @@
+---
+roles:
+ - name: elliotweiser.osx-command-line-tools
+
+collections:
+ - name: geerlingguy.mac
diff --git a/scripts/ansible/macos/site.yaml b/scripts/ansible/macos/site.yaml
new file mode 100644
index 0000000..2fb8578
--- /dev/null
+++ b/scripts/ansible/macos/site.yaml
@@ -0,0 +1,57 @@
+# vi: ft=yaml.ansible
+---
+- name: Setup go and Qt development environment in macOS
+ hosts:
+ - all
+ vars:
+ qtifw_path: "/Volumes/{{qtifw_exec_name}}"
+ qtifw_installer_exec_path: "{{ qtifw_path }}/{{ qtifw_exec_name }}.app/Contents/MacOS/{{ qtifw_exec_name }}"
+ qtifw_installer_name: "QtInstallerFramework-macOS-x64-{{ qtifw_version }}.dmg"
+ qtifw_exec_name: "{{ qtifw_installer_name | splitext | first }}"
+ qtifw_version: "4.4.2"
+ xcode_source_path: ~/Downloads/Xcode_11.7.xip
+ xcode_dest_path: ~/Downloads/Xcode_11.7.xip
+ homebrew_installed_packages:
+ - go@1.17
+ - make
+ - gpg
+ - qt5
+ - wget
+ - create-dmg
+
+ roles:
+ - geerlingguy.mac.homebrew
+
+ tasks:
+ - name: Download Qt installer framework
+ get_url:
+ url: "https://download.qt.io/official_releases/qt-installer-framework/{{ qtifw_version }}/{{ qtifw_installer_name }}"
+ checksum: sha256:a635013bcaa7e518400ea1acfc07f7467f60a6e3bb3e3774c9889ccc73a28c13
+ dest: "/tmp/{{ qtifw_installer_name }}"
+ mode: 0644
+
+ - name: Mount the Qt installer dmg image
+ command:
+ argv:
+ - hdiutil
+ - attach
+ - "/tmp/{{ qtifw_installer_name }}"
+ creates: "{{ qtifw_path }}"
+
+ - name: Install Qt installer framework
+ command:
+ argv:
+ - "{{ qtifw_installer_exec_path }}"
+ - "in"
+ - "--da"
+ - "-c"
+ - "--al"
+ creates: "{{ ansible_user_dir }}/Qt/QtIFW-{{ qtifw_version }}"
+
+ - name: Unmount the Qt installer dmg image
+ command:
+ argv:
+ - hdiutil
+ - detach
+ - "{{ qtifw_path }}"
+ ignore_errors: true